The table below provides an approximate mapping of various ifconfig(1m) features to ipadm(1m) subcommands.

ifconfig(1m)ipadm(1m)
plumb/unplumb ipadm create-if
 ipadm delete-if
 [address [/prefix_length] [dest_address]] [addif address [/prefix_length]]
 [removeif address [/prefix_length]] [netmask mask] [destination dest_address]
 {auto-dhcp | dhcp} [primary] [wait seconds] extend | release | start 
ipadm create-addr -T static
 ipadm create-addr -T dhcp
 ipadm create-addr -T addrconf
 ipadm show-addr
 ipadm delete-addr
 ipadm refresh-addr
 [deprecated | -deprecated] [preferred | -preferred]
 [private | -private] [zone zonename | - zone | -all-zones]
 [xmit | -xmit] 
ipadm set-addrprop
 ipadm show-addrprop
 [up]  ipadm enable-addr
 [down]  ipadm disable-addr
 [metric n] [mtu n] [nud | -nud]
 [arp | -arp] [usesrc [name | none]]
 [router | -router] 
ipadm set-ifprop
 ipadm show-ifprop
 ipadm reset-ifprop
[ipmp] [group [name | ""]] [standby | -standby] [failover | -failover] ipadm *-ipmp set of subcommands.
 These subcommands will not be supported in the first release of ipadm.
[tdst tunnel_dest_address] [tsrc tunnel_src_address] [encaplimit n | -encaplimit]
 [thoplimit n] 
dladm *-iptun set of subcommands from Clearview IP tunneling project
[auth_algs authentication algorithm] [encr_algs encryption algorithm]
 [encr_auth_algs authentication algorithm] 
ipsecconf(1m)
 [auto-revarp] [ether [address]] [index if_index]
 [subnet subnet_address] [broadcast address]
 [token address/prefix_length]
 dhcp options - inform, ping, release, status, drop 
 No equivalent subcommand, yet
[modlist] [modinsert mod_name@pos] [modremove mod_name@pos]  No equivalent subcommand, yet
ifconfig(1m)ipadm(1m)
 Creating interfaces








bash-3.2# ifconfig bge1 plumb upbash-3.2# ifconfig bge1 inet6 plumb upbash-3.2# ifconfig bge1 bge1: flags=1100843 mtu 1500 index 54 inet 0.0.0.0 netmask ff000000  ether 0:3:ba:44:3d:35 bash-3.2# ifconfig bge1  inet6bge1: flags=2100841 mtu 1500 index 54 inet6 fe80::203:baff:fe44:3d35/10 





bash-3.2# ipadm create-if bge1bash-3.2# ipadm show-if bge1INTF       STATE    MTU        FLAGSbge1       ok       1500       mcast,bcastNote: ipadm plumbs both IPv4 and IPv6 interfaces by default.One can use -f flag to override the above behavior.
 Deleting interfaces


bash-3.2# ifconfig bge1 unplumbbash-3.2# ifconfig bge1 inet6 unplumb


bash-3.2# ipadm delete-if bge1Note: ipadm unplumbs both IPv4 and IPv6 interfaces by default.One can use -f flag to override the above behavior
 Adding static IPv4 address





bash-3.2# ifconfig bge1 plumb bash-3.2# ifconfig bge1 10.10.1.2/24 upbash-3.2# ifconfig -abge1: flags=1000843 mtu 1500 index 7        inet 10.10.1.2 netmask ffffff00 broadcast 10.10.1.255        ether 0:3:ba:44:4f:a9 








bash-3.2# ipadm create-addr -T static -a local=10.10.1.2/24 bge1/v4addrbash-3.2# ipadm show-addr -i bge1OBJECT         ORIGIN   STATE      FLAGS     ADDRbge1/v4addr       static   preferred  ~---       10.10.1.2/24bash-3.2# ipadm show-addr bge1/v4addrOBJECT         ORIGIN   STATE      FLAGS     ADDRbge1/v4addr       static   preferred  ~---       10.10.1.2/24Note: We don't have to explicitly create bge1 interface. ipadm create-addrimplicitly creates the interface if it ins not already created.
 Adding static IPv6 addresses.
 Note: Link local addresses must first be configured on the interface before any static IPv6 addresses can be configured.














bash-3.2# ifconfig bge1 inet6 plumb/* Above plumb creates link-local and any stateless/stateful addresses */bash-3.2# ifconfig bge1 inet6 addif 2002::1234 upCreated new logical interface bge1:2bash-3.2# ifconfig -abge1: flags=1000843 mtu 1500 index 7        inet 10.10.1.2 netmask ffffff00 broadcast 10.10.1.255        ether 0:3:ba:44:4f:a9 bge1: flags=2000841 mtu 1500 index 7        inet6 fe80::203:baff:fe44:4fa9/10         ether 0:3:ba:44:4f:a9 bge1:1: flags=20a0841 mtu 1500 index 7        inet6 subnet 2002:a08:39f0:3::/64 bge1:2: flags=2000840 mtu 1500 index 7        inet6 2002::1234/64 








bash-3.2# ipadm create-addr -T addrconf bge1/v6auto-addr/* Above subcommand creates link-local and any stateless/stateful addresses */bash-3.2# ipadm create-addr -T static -a local=2002::1234/64 bge1/v6addrbash-3.2# ipadm show-addr -i bge1OBJECT         ORIGIN   STATE      FLAGS     ADDRbge1/v4addr       static   preferred  ~---       10.10.1.2/24bge1/v6auto-addr  addrconf preferred  ~---  fe80::203:baff:fe44:3d35/10bge1/v6auto-addr  addrconf preferred  ~---       2002:a08:39f0:3:203:baff:fe44:3d35/64bge1/v6addr       static   preferred  ~---       2002::1234/64
 Creating an IPv4 dhcp-controlled address











bash-3.2# ifconfig bge1 plumbbash-3.2# ifconfig bge1 dhcp startbash-3.2# ifconfig bge1bge0: flags=1004843 mtu 1500 index 2        inet 10.8.48.170 netmask ffffff80 broadcast 10.8.48.255        ether 0:3:ba:44:4f:a8 /* extend the lease of a dhcpv4 address*/bash-3.2# ifconfig bge1 dhcp extend/* dropping the address */bash-3.2# ifconfig bge1 dhcp drop/* releasing the address */bash-3.2# ifconfig bge1 dhcp release









bash-3.2# ipadm create-addr -T dhcp bge1/dhcpaddrbash-3.2# ipadm show-addr bge1/dhcpaddrOBJECT          ORIGIN   STATE        FLAGS     ADDRbge1/dhcpaddr   dhcp     preferred    ~---       10.8.48.242/25/* extend the lease of a dhcpv4 address*/bash-3.2# ipadm refresh-addr bge1/dhcpaddr/* dropping the address */bash-3.2# ipadm delete-addr bge1/dhcpaddr/* releasing the address */bash-3.2# ipadm delete-addr -r bge1/dhcpaddr
 Deleting addresses






/* removes all the addresses on the IPv4 interface */bash-3.2# ifconfig bge1 unplumb /* removes just 2002::1234 interface */bash-3.2# ifconfig bge1 inet6 removeif 2002::1234/* removes link-local, stateless address and all other addresses */bash-3.2# ifconfig bge1 inet6 unplumb




bash-3.2# ipadm delete-addr bge1/v4addrbash-3.2# ipadm delete-addr bge1/v6addrbash-3.2# ipadm delete-addr bge1/v6auto-addr/* drops the dhcp address */bash-3.2# ipadm delete-addr bge1/dhcpaddr
 Setting interface/address properties













/* enable forwarding on both IPv4 and IPv6 interfaces */bash-3.2# ifconfig bge1 routerbash-3.2# ifconfig bge1 inet6 router/* enable arp/nud on IPv4/IPv6 interfaces */bash-3.2# ifconfig bge1 arpbash-3.2# ifconfig bge1 inet6 nud/* disable forwarding on both IPv4 and IPv6 interfaces */bash-3.2# ifconfig bge1 -routerbash-3.2# ifconfig bge1 inet6 -router/* disable arp/nud on IPv4/IPv6 interfaces */bash-3.2# ifconfig bge1 -arpbash-3.2# ifconfig bge1 inet6 -nud/* changing netmask on an address */bash-3.2# ifconfig bge1:1 netmask 255.255.255.248











/* enable forwarding on both IPv4 and IPv6 interfaces */bash-3.2# ipadm set-ifprop -p forwarding=yes bge1/* enable arp/nud on IPv4/IPv6 interfaces */bash-3.2# ipadm set-ifprop -f inet -p arp=yes bge1bash-3.2# ipadm set-ifprop -f inet6 -p nud=yes bge1/* disable forwarding on both IPv4 and IPv6 interfaces */bash-3.2# ipadm set-ifprop -p forwarding=no bge1/* enable arp/nud on IPv4/IPv6 interfaces */bash-3.2# ipadm set-ifprop -f inet -p arp=no bge1bash-3.2# ipadm set-ifprop -f inet6 -p nud=no bge1/* changing netmask on an address */bash-3.2# ipadm set-addrprop -p prefixlen=30 bge1/v4addr
last modified by rrc_1956 on 2009/11/07 00:51
Collectives
Project


© Sun Microsystems Inc. 2009
XWiki Enterprise 1.8.2.19075 - Documentation
Terms Of Use | Privacy | Trademarks | Copyright Policy | Site Guidelines | Site map | Help
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Use.