Documentation
¶
Index ¶
Constants ¶
View Source
const ( EnvName = "IS_HOST_A" // 无需修改 NSName = "ns0" BridgeName = "bridge0" VEth0 = "veth0" NsEth0 = "nseth0" // 如果需要在自己的机器上实现,需要改动HostA 和 HostB 变量即可 HostA = "192.168.0.3/24" HostANS0 = "10.0.1.1/24" HostABridge0 = "10.0.1.254/24" HostB = "192.168.0.2/24" HostBNS0 = "10.0.2.1/24" HostBBridge0 = "10.0.2.254/24" )
Variables ¶
View Source
var (
IsHostA = false
)
Functions ¶
func SetupBridge ¶
func SetupIPTables ¶
func SetupIPTables()
func SetupNetNamespace ¶
func SetupNsDefaultRoute ¶
func SetupNsDefaultRoute()
func SetupRouteNs2Ns ¶
func SetupRouteNs2Ns()
Types ¶
Click to show internal directories.
Click to hide internal directories.