As mentioned in Chapter 3, "Kernel Requirements for a Full-Featured Lab," alias interfaces provide a way to assign multiple IP addresses to one physical interface. These addresses can either be from the same network broadcast domain or a different address range. However, they do not provide Layer 2 separation as VLAN tagging does.
You will learn in Chapter 9, "Dynamic Routing Protocols—Interior Gateway Protocols," and Chapter 10, "ISP Connectivity with BGP4: An Exterior Gateway Path-Vector Routing Protocol for Interdomain Routing," how alias information can be transported via dynamic routing protocols and used for virtual servers, redundancy, and Dynamic Name Service (DNS) round-robin configurations. Examples 5-1, 5-2, and 5-3 show the configuration of alias/secondary interfaces on Linux, OpenBSD, and FreeBSD systems; the corresponding statistics; and their representation in the Address Resolution Protocol (ARP) and routing tables. Keep in mind that the "colon" notation (shaded text) of Linux interfaces in general is not exactly equivalent to Cisco IOS subinterfaces.
Example 5-1. Linux Alias Interface Example
[root@callisto:~#] ifconfig eth1:1 192.168.45.1
[root@callisto:~#] ifconfig eth0:0 192.168.14.14
[root@callisto:~#] ifconfig
eth0 Link encap:Ethernet HWaddr 00:10:5A:D7:93:60
inet addr:192.168.14.1 Bcast:192.168.14.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:1485 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 b) TX bytes:122180 (119.3 Kb)
Interrupt:5 Base address:0xd800
eth0:0 Link encap:Ethernet HWaddr 00:10:5A:D7:93:60
inet addr:192.168.14.14 Bcast:192.168.14.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:5 Base address:0xd800
eth1 Link encap:Ethernet HWaddr 52:54:05:E3:51:87
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2604 errors:0 dropped:0 overruns:0 frame:0
TX packets:3166 errors:0 dropped:0 overruns:0 carrier:0
collisions:7 txqueuelen:100
RX bytes:691838 (675.6 Kb) TX bytes:307948 (300.7 Kb)
Interrupt:9 Base address:0xd400
eth1:1 Link encap:Ethernet HWaddr 52:54:05:E3:51:87
inet addr:192.168.45.1 Bcast:192.168.45.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:9 Base address:0xd400
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:489 errors:0 dropped:0 overruns:0 frame:0
TX packets:489 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:54587 (53.3 Kb) TX bytes:54587 (53.3 Kb)
[root@callisto:~#] arp -an
? (192.168.1.254) at 48:54:E8:8C:0A:3F [ether] on eth1
? (192.168.14.254) at 00:60:47:1E:AD:B5 [ether] on eth0
? (192.168.45.254) at 48:54:E8:8C:0A:3F [ether] on eth1
[root@callisto:~#] netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.14.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.45.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.1.254 0.0.0.0 UG 0 0 0 eth1
############################################################################
# Alternative configuration via the Linux "ip" utility #
# Note that "ip" differentiates between "secondary" and "alias" addresses #
############################################################################
[root@callisto:~#] ip address add 192.168.14.14/24 broadcast 255.255.255.0 label eth0:0
dev eth0
[root@callisto:~#] ip address show eth0
2: eth0:
link/ether 00:10:5a:d7:93:60 brd ff:ff:ff:ff:ff:ff
inet 192.168.14.1/24 brd 192.168.14.255 scope global eth0
inet 192.168.14.14/24 brd 255.255.255.0 scope global secondary eth0:0
[root@callisto:~#] ip address add 192.168.45.1/24 broadcast 255.255.255.0 label eth1:1
dev eth1
[root@callisto:~#] ip address show eth1
3: eth1:
link/ether 52:54:05:e3:51:87 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.1/24 brd 192.168.1.255 scope global eth1
inet 192.168.45.1/24 brd 192.168.45.255 scope global eth1:1
[root@callisto:~#] ip route show
192.168.1.0/24 dev eth1 scope link
192.168.14.0/24 dev eth0 scope link
192.168.45.0/24 dev eth1 proto kernel scope link src 192.168.45.1
127.0.0.0/8 dev lo scope link
default via 192.168.1.254 dev eth1
Example 5-2. OpenBSD Alias Interface Example
[root@ganymed:~#] ifconfig ne3 alias 192.168.45.254 netmask 255.255.255.0
[root@ganymed:~#] ifconfig -A
lo0: flags=8049
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000
lo1: flags=8049
inet 192.168.44.1 netmask 0xffffff00
inet6 fe80::1%lo1 prefixlen 64 scopeid 0x4
inet6 ::1 prefixlen 128
ne3: flags=8b63
mtu 1500
media: Ethernet manual
inet 192.168.1.254 netmask 0xffffff00 broadcast 192.168.1.255
inet6 fe80::4a54:e8ff:fe8c:a3f%ne3 prefixlen 64 scopeid 0x1
inet 192.168.45.254 netmask 0xffffff00 broadcast 192.168.45.255
ne4: flags=8863
media: Ethernet 10baseT full-duplex
inet 192.168.2.254 netmask 0xffffff00 broadcast 192.168.2.255
inet6 fe80::5054:5ff:fee3:e42f%ne4 prefixlen 64 scopeid 0x2
ne5: flags=8863
media: Ethernet 10baseT full-duplex
inet 111.11.117.206 netmask 0xffffff00 broadcast 111.11.117.255
inet6 fe80::5054:5ff:fee3:5187%ne5 prefixlen 64 scopeid 0x3
ppp0: flags=8010
ppp1: flags=8010
tun0: flags=10
tun1: flags=10
enc0: flags=0<> mtu 1536
vlan0: flags=0<> mtu 1500
vlan1: flags=0<> mtu 1500
gre0: flags=8010
gif0: flags=8010
gif1: flags=8010
gif2: flags=8010
gif3: flags=8010
faith0: flags=8002
[root@ganymed:~#] netstat -rn -f inet
Routing tables
Internet:
Destination Gateway Flags Refs Use Mtu Interface
default 111.11.117.1 UGS 1 3570 1500 ne5
127/8 127.0.0.1 UGRS 0 0 33224 lo0
127.0.0.1 127.0.0.1 UH 2 38 33224 lo0
192.168.1/24 link#1 UC 0 0 1500 ne3
192.168.1.1 52:54:5:e3:51:87 UHL 1 3387 1500 ne3
192.168.1.2 8:0:46:64:74:1b UHL 1 3049 1500 ne3
192.168.2/24 link#2 UC 0 0 1500 ne4
192.168.2.7 0:10:5a:c4:2c:4 UHL 0 2150 1500 ne4
192.168.44.1 192.168.44.1 UH 0 0 33224 lo1
192.168.45/24 link#1 UC 0 0 1500 ne3
111.11.117/24 link#3 UC 0 0 1500 ne5
111.11.117.1 0:5:9a:5b:23:fc UHL 1 0 1500 ne5
111.11.117.206 127.0.0.1 UGHS 0 0 33224 lo0
Example 5-3. FreeBSD Alias Interface Example
[root@castor:~#] ifconfig ed0 alias 192.168.7.77 netmask 255.255.255.255
[root@castor:~#] ifconfig
xl0: flags=8b43
options=3
inet 192.168.2.7 netmask 0xffffff00 broadcast 192.168.2.255
inet6 fe80::210:5aff:fec4:2c04%xl0 prefixlen 64 scopeid 0x1
ether 00:10:5a:c4:2c:04
media: Ethernet autoselect (10baseT/UTP)
status: active
ed0: flags=8a43
inet 192.168.7.7 netmask 0xffffff00 broadcast 192.168.7.255
inet6 fe80::5054:5ff:fee3:e488%ed0 prefixlen 64 scopeid 0x2
inet 192.168.7.77 netmask 0xffffffff broadcast 192.168.7.77
ether 52:54:05:e3:e4:88
lp0: flags=8810
sl0: flags=c010
sl1: flags=c010
ds0: flags=8008
stf0: flags=0<> mtu 1280
faith0: flags=8002
vlan0: flags=0<> mtu 1500
ether 00:00:00:00:00:00
vlan: 0 parent interface:
vlan1: flags=0<> mtu 1500
ether 00:00:00:00:00:00
vlan: 0 parent interface:
lo0: flags=8049
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0xb
inet 127.0.0.1 netmask 0xff000000
ppp0: flags=8010
ppp1: flags=8010
[root@castor:~#] netstat -rn -f inet
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
default 192.168.2.254 UGSc 4 1836 xl0
127.0.0.1 127.0.0.1 UH 0 0 lo0
192.168.2 link#1 UC 1 0 xl0
192.168.2.254 52:54:05:e3:e4:2f UHLW 4 0 xl0 592
192.168.7 link#2 UC 0 0 ed0
192.168.7.77/32 link#2 UC 0 0 ed0
NOTE
In contrast to "real" physical interfaces (and to BSD aliases), ifconfig down does not only shut down the interface, but entirely removes it; it cannot be brought up again with a mere ifconfig up, but has to be reassigned the IP address (thus created anew). This is true for several other pseudo-interfaces as well.
Example 5-4 demonstrates a secondary address assignment under Cisco IOS Software as emphasized via the shaded text. Note that Linux differentiates between a secondary address and an interface alias, as demonstrated with the ip tool in Example 5-1 (shaded text).
Example 5-4. Cisco IOS Secondary Interface Address Example
scar# show running-config
!
...
interface Ethernet1
bandwidth 10000
ip address 192.168.14.14 255.255.255.0 secondary
ip address 192.168.14.254 255.255.255.0
no ip proxy-arp
media-type 10BaseT
!
...
scar# show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 192.168.14.1 to network 0.0.0.0
C 192.168.14.0/24 is directly connected, Ethernet1
10.0.0.0/32 is subnetted, 1 subnets
C 10.0.0.1 is directly connected, Loopback0
C 192.168.7.0/24 is directly connected, Ethernet0
S* 0.0.0.0/0 [1/0] via 192.168.14.1
scar# show arp
Protocol Address Age (min) Hardware Addr Type Interface
Internet 192.168.14.1 0 0010.5ad7.9360 ARPA Ethernet1
Internet 192.168.14.14 - 0060.471e.adb5 ARPA Ethernet1
Internet 192.168.7.7 14 5254.05e3.e488 ARPA Ethernet0
Internet 192.168.7.254 - 0060.471e.adb2 ARPA Ethernet0
Internet 192.168.14.254 - 0060.471e.adb5 ARPA Ethernet1
VLAN Configurations
Today, two dominant VLAN tagging methods exist: the Cisco proprietary Inter-Switch Link (ISL) approach and the standardized IEEE 802.1Q method. Note also that VLAN trunks are special ports or interfaces that are capable of delivering multi-VLAN traffic to a directly connected trunk port or interface.
Cisco has developed a proprietary protocol (VTP, or VLAN Trunking Protocol) to distribute VLAN information through a vast switched network without the need to configure VLANs on every switch. The only task left to do for the administrator is to configure a VTP domain and its participants and to assign ports to specific VLANs distributed via VTP. A rather young open standard for that is available as well (see IEEE GVRP - Generic VLAN Registration Protocol).
VLAN setup itself is not difficult to configure, if you adhere to the following:
To ensure that everything is working, I recommend verifying proper operation with the arp, netstat, and ifconfig/ip commands.
In addition, check MTU issues with large IP datagrams such as FTP transfers or handcrafted ping packets. 802.1Q VLAN tagging adds 4 overhead octets between the frame header and the payload that need to be accounted for. Therefore, adjust the interface MTU size to 1496 in case that is not done automatically (as is done on BSD systems).
Keep in mind that the MTU throughout of your subnet should be consistent as well (for example, 1496 octets). Depending on the protocols involved, it might even become necessary to further decrease the MTU. This might be necessary for both the VLAN and parent interfaces.
Some NICs, such as the Intel FastEtherPro, support large frames and VLAN demultiplexing natively (in firmware) and operate well with the default MTU of 1500. Sometimes patching the drivers also helps.
Adding alias interfaces to VLAN interfaces works perfectly fine, too, exactly as with physical interfaces.
All represented platforms have no problem with the Cisco native VLAN1. The alias and VLAN limits of a platform usually can be derived only when investigating the sources.
Linux imposes a VLAN limit of 4096 VLANs per interface on 2.4.x kernels.
Remember to restart your firewall when adding/deleting interfaces! Unfortunately, a lot of ill-configured firewall gateways nowadays break two-way-path MTU discovery. Ensure that you allow the proper Internet Control Message Protocol (ICMP) packets through in both directions. (ICMP type 3/code 4 = "fragmentation needed but do not fragment bit set" in combination with the probing IP packets with DF-bit set.)
Adding frame overhead such as with Multiprotocol Label Switching (MPLS) shim headers or VLAN tagging represents in the view of many switches a so-called giant or jumbo frame, which usually is silently discarded on regular switch ports. If you encounter problems that appear to affect only large frames, check the giant counters of your switch. Most modern switches and IOS/CatOS versions can deal with this issue. As a workaround, you could configure a VLAN trunk.
Figure 5-1 shows the three VLAN topologies discussed in this chapter. Example 5-5 shows the switch VLAN configuration, and Example 5-6 shows the corresponding ARP output. Example 5-7 presents the analogous configuration for the router involved. Example 5-8 provides status information, and Example 5-9 shows the router's ARP table.
Example 5-5. Ethernet Switch VLAN Configuration (IOS)
Switch# show running-config
!
ip subnet-zero
!
interface FastEthernet0/1
switchport mode trunk
!
interface FastEthernet0/2
switchport mode trunk
!
interface FastEthernet0/3
switchport mode trunk
!
interface VLAN1
ip address 192.168.7.8 255.255.255.0
no ip directed-broadcast
no ip route-cache
!
interface VLAN8
ip address 192.168.80.2 255.255.255.0
no ip directed-broadcast
no ip route-cache
!
ip default-gateway 192.168.7.7
!
Example 5-6. VLAN-Related Switch ARP Table
Switch# show arp
Protocol Address Age (min) Hardware Addr Type Interface
Internet 192.168.80.1 10 5254.05e3.e488 ARPA VLAN8
Internet 192.168.80.2 - 0006.5258.5d40 ARPA VLAN8
Internet 192.168.7.8 - 0006.5258.5d40 ARPA VLAN1
Internet 192.168.80.254 8 0008.e34d.be81 ARPA VLAN8
Example 5-7. Router VLAN Configuration
mufasa# show running-config
...
!
interface FastEthernet0/1
description *** 802.1Q Trunk ***
no ip address
no ip mroute-cache
duplex auto
speed auto
!
interface FastEthernet0/1.1
encapsulation dot1Q 1 native
ip address 192.168.7.254 255.255.255.0
!
interface FastEthernet0/1.8
encapsulation dot1Q 8
ip address 192.168.80.254 255.255.255.0
!
...
Example 5-8. Router VLAN Status
mufasa# show vlans
Virtual LAN ID: 1 (IEEE 802.1Q Encapsulation)
vLAN Trunk Interface: FastEthernet0/1.1
This is configured as native Vlan for the following interface(s) :
FastEthernet0/1
Protocols Configured: Address: Received: Transmitted:
IP 192.168.7.254 0 19
Virtual LAN ID: 8 (IEEE 802.1Q Encapsulation)
vLAN Trunk Interface: FastEthernet0/1.8
Protocols Configured: Address: Received: Transmitted:
IP 192.168.80.254 20 27
Example 5-9. Router VLAN-Related ARP Table
mufasa# show arp
Protocol Address Age (min) Hardware Addr Type Interface
Internet 192.168.80.1 7 5254.05e3.e488 ARPA FastEthernet0/1.8
Internet 192.168.80.2 5 0006.5258.5d40 ARPA FastEthernet0/1.8
Internet 192.168.7.254 - 0008.e34d.be81 ARPA FastEthernet0/1.1
Internet 192.168.80.254 - 0008.e34d.be81 ARPA FastEthernet0/1.8
The following two subsections elaborate on VLAN capabilities of FreeBSD, OpenBSD, and Linux and discuss differences and similarities in setup and behavior.
Linux VLAN Capabilities
Late 2.4.x kernels provide 802.1Q VLAN capabilities as a native kernel module. However, one still needs to retrieve the vconfig VLAN administration utility from http://www.candelatech.com/~greear/vlan.html#setup. Most up-to-date Linux distributions already include this utility.
Recently, the capability to define MAC-based VLANs was added via the macvlan_config utility, which is included in the vconfig archive. You still have to apply a kernel patch for that extension, however. Example 5-10 shows the configuration sequence for Linux VLAN interfaces, Example 5-11 shows the resulting status, and Example 5-12 shows additional monitoring information. The shaded text emphasizes the previously mentioned warnings about MTU.
Example 5-10. Linux VLAN Interface Configuration
[root@callisto:~#] vconfig add eth0 8
[root@callisto:~#] ifconfig vlan8 192.168.80.3/24 mtu 1496
Example 5-11. Linux Interface Status After VLAN Configuration
[root@callisto:~#] ifconfig
eth0 Link encap:Ethernet HWaddr 00:10:5A:D7:93:60
inet addr:192.168.14.1 Bcast:192.168.14.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:124 errors:0 dropped:0 overruns:0 frame:0
TX packets:28 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:9246 (9.0 Kb) TX bytes:2478 (2.4 Kb)
Interrupt:5 Base address:0xd800
eth1 Link encap:Ethernet HWaddr 52:54:05:E3:51:87
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9007 errors:0 dropped:0 overruns:0 frame:0
TX packets:5240 errors:0 dropped:0 overruns:0 carrier:0
collisions:37 txqueuelen:100
RX bytes:1891927 (1.8 Mb) TX bytes:497578 (485.9 Kb)
Interrupt:9 Base address:0xd400
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:84 errors:0 dropped:0 overruns:0 frame:0
TX packets:84 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:6308 (6.1 Kb) TX bytes:6308 (6.1 Kb)
vlan1 Link encap:Ethernet HWaddr 00:10:5A:D7:93:60
inet addr:192.168.7.10 Bcast:192.168.7.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1496 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
vlan8 Link encap:Ethernet HWaddr 00:10:5A:D7:93:60
inet addr:192.168.80.3 Bcast:192.168.80.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1496 Metric:1
RX packets:21 errors:0 dropped:0 overruns:0 frame:0
TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1764 (1.7 Kb) TX bytes:2168 (2.1 Kb)
Example 5-12. Linux VLAN-Related Status Information
[root@callisto:~#] netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.7.0 0.0.0.0 255.255.255.0 U 40 0 0 vlan1
192.168.80.0 0.0.0.0 255.255.255.0 U 40 0 0 vlan8
192.168.1.0 0.0.0.0 255.255.255.0 U 40 0 0 eth1
192.168.14.0 0.0.0.0 255.255.255.0 U 40 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 40 0 0 lo
0.0.0.0 192.168.1.254 0.0.0.0 UG 40 0 0 eth1
[root@callisto:~#] arp -an
? (192.168.1.2) at 08:00:46:64:74:1B [ether] on eth1
? (192.168.1.254) at 48:54:E8:8C:0A:3F [ether] on eth1
? (192.168.80.1) at 52:54:05:E3:E4:88 [ether] on vlan8
[root@callisto:~#] less /proc/net/vlan/config
VLAN Dev name | VLAN ID
Name-Type: VLAN_NAME_TYPE_PLUS_VID_NO_PAD
vlan1 | 1 | eth0
vlan8 | 8 | eth0
[root@callisto:~#] less /proc/net/vlan/vlan8
vlan8 VID: 8 REORDER_HDR: 1 dev->priv_flags: 1
total frames received: 21
total bytes received: 1764
Broadcast/Multicast Rcvd: 0
total frames transmitted: 24
total bytes transmitted: 2168
total headroom inc: 0
total encap on xmit: 24
Device: eth0
INGRESS priority mappings: 0:0 1:0 2:0 3:0 4:0 5:0 6:0 7:0
EGRESSS priority Mappings:
[root@callisto:~#] less /proc/net/vlan/vlan1
vlan1 VID: 1 REORDER_HDR: 1 dev->priv_flags: 1
total frames received: 0
total bytes received: 0
Broadcast/Multicast Rcvd: 0
total frames transmitted: 0
total bytes transmitted: 0
total headroom inc: 0
total encap on xmit: 0
Device: eth0
INGRESS priority mappings: 0:0 1:0 2:0 3:0 4:0 5:0 6:0 7:0
EGRESSS priority Mappings:
FreeBSD/OpenBSD VLAN Capabilities
FreeBSD/OpenBSD setup is straightforward and works the same way for both operating systems. The MTU size is adjusted automatically during setup of the VLAN interfaces.
Consult the BSD vlan(4) and ifconfig(8) man pages for further details about these platforms. Example 5-13 shows the configuration steps for FreeBSD VLAN setup, Example 5-14 shows the resulting interface status, and Example 5-15 provides additional status information.
Example 5-13. BSD VLAN Configuration
[root@castor:~#] ifconfig vlan8 create
[root@castor:~#] ifconfig vlan8 vlan 8 vlandev ed0
[root@castor:~#] ifconfig vlan8 192.168.80.1/24
Example 5-14. FreeBSD Interface Status After VLAN Configuration
[root@castor:~#] ifconfig -a
xl0: flags=8b43
options=3
inet 192.168.2.7 netmask 0xffffff00 broadcast 192.168.2.255
inet6 fe80::210:5aff:fec4:2c04%xl0 prefixlen 64 scopeid 0x1
ether 00:10:5a:c4:2c:04
media: Ethernet autoselect (10baseT/UTP)
status: active
ed0: flags=8a43
inet 192.168.7.7 netmask 0xffffff00 broadcast 192.168.7.255
inet6 fe80::5054:5ff:fee3:e488%ed0 prefixlen 64 scopeid 0x2
ether 52:54:05:e3:e4:88
lo0: flags=8049
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0xb
inet 127.0.0.1 netmask 0xff000000
vlan8: flags=8843
inet6 fe80::210:5aff:fec4:2c04%vlan8 prefixlen 64 scopeid 0xe
inet 192.168.80.1 netmask 0xffffff00 broadcast 255.255.255.0
ether 52:54:05:e3:e4:88
vlan: 8 parent interface: ed0
...
Example 5-15. FreeBSD VLAN Status Information
[root@castor:~#] netstat -rn -f inet
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
default 192.168.2.254 UGSc 5 3826 xl0
127.0.0.1 127.0.0.1 UH 0 0 lo0
192.168.2 link#1 UC 1 0 xl0
192.168.2.254 52:54:05:e3:e4:2f UHLW 5 0 xl0 694
192.168.7 link#2 UC 1 0 ed0
192.168.7.7 52:54:05:e3:e4:88 UHLW 0 4 lo0
192.168.80 link#14 UC 1 0 vlan8
192.168.80.1 52.54.5.e3.e4.88 UHLW 0 4 lo0
[root@castor:~#] arp -an
? (192.168.2.254) at 52:54:05:e3:e4:2f on xl0 [ethernet]
? (192.168.7.7) at 52:54:05:e3:e4:88 on ed0 permanent [ethernet]
? (192.168.80.1) at 52:54:05:e3:e4:88 on vlan8 permanent [vlan]
? (192.168.80.2) at (incomplete) on vlan8 [vlan]
? (192.168.80.3) at 00:10:5a:d7:93:60 on vlan8 [vlan]