Open main menu

Aram's Wiki β

Changes

Solaris zones virtual networking with NAT

10 bytes removed, 16:38, 7 June 2018
no edit summary
[[Category:Solaris]]
# prepare the GZ; net2 is the interface connected to the Internet.
dladm create-etherstub ether0
dladm create-vnic -l ether0 vnic0
svcadm enable network/ipfilter
# prepare Prepare the zone; for-sysroot is the zone name.
dladm create-vnic -l ether0 vnic1
zonecfg -z for-sysroot "create; set ip-type=exclusive; add net; set physical=vnic1; end; commit"
# in sys-config set up vnic1/v4 10.0.0.2/8 with 10.0.0.1 as default router.
# delete Delete the zone
zoneadm -z for-sysroot shutdown
zoneadm -z for-sysroot uninstall -F
dladm delete-vnic vnic1
# restore Restore GZ to original state
routeadm -u -d ipv4-forwarding
ipadm delete-addr vnic0/v4