ITL - Internet Teaching Laboratory

Data Link Layer


Ethernet (MAC) Addresses

Asante AH2072 Hub

A single ethernet address is associated with the hub. That address can be determined from the console. The menu option

     g      General Information
will show the hub's ethernet address.

Cisco 2900

The command

     switch# show interfaces
issued from EXEC mode will show information about the interfaces, including the MAC address. If you want to show only a specific interface use the form "show interfaces t s/p" where "t" is the type of interface (e.g. fastethernet), "s" is the slot containing the ethernet interface board and "p" is the port number on that board. For example, for fast-ethernet port 0/1 use
     switch# show interfaces fastethernet 0/1

Cisco 4000/7000/7010

The command

     router# show interfaces
issued from EXEC mode will show information about the interfaces, including the MAC address. If you want to show only a specific interface use the form "show interfaces t s/p" where "t" is the type of interface (e.g. ethernet, fddi), "s" is the slot containing the ethernet interface board and "p" is the port number on that board. For example, for ethernet port 0/0 use
     router# show interfaces ethernet 0/0

3COM LANplex and CoreBuilder 2500/3500

The console option

     ethernet / detail / all

will show the ethernet addresses of all the ports.

Non-Ethernet Links

Some interfaces (e.g. fddi) imply a particular link protocol. Other interfaces (e.g.hssi and fsip serial interfaces) can support a range of link protocols, but default to a particular protocol (serial interfaces default to hdlc). It is not necessary to specify the link protocol for these interfaces, but you can. You should refer to the Cisco IOS documentation for a list of possible link protocols.

Point-to-Point Protocol (PPP)

Although PPP is usually used when two computers are connected through their serial ports using modems, it can also be used without the modems. A rolled cable connecting the serial ports of two computers will substitute for the modems.

To get a PPP connection between two computers, PPP must be started in passive mode on one computer (so that it waits for data from the other end and doesn't simply terminate) and in active mode on the other computer. A command that starts ppp in passive mode is "pppd device speed local passive ipaddr:" where "device" is either /dev/ttyS0 or /dev/ttyS1 to select the particular serial port, "speed" is the baud rate of the port, "local" indicates that no modem signals are to be used, and "ipaddr:" specifies the IP address to be assigned to this end of the connection. For example, if two computers have their S0 serial ports connected, the following command will start ppp in passive mode and give the local interface the address 10.0.0.1:

     [Linux prompt]# pppd /dev/ttyS0 9600 local passive 10.0.0.1:
The command to start ppp in active mode has the same form but without the option "passive". For example, after the above command has been used to start one computer in passive mode, the following could be used on the computer at the other end of the connection to start it with IP address 10.0.0.2:
     [Linux prompt]# pppd /dev/ttyS0 9600 local 10.0.0.2:
For other options see the man pages for pppd.

The communication exchanged by the two computers running ppp can be observed by connecting the serial ports of those computers to the serial ports of a third computer and running the utility "sereal" on that computer. Click here for information on interpreting the PPP packets.

Transparent Bridging

Cisco 2900

The Cisco 2900 performs transparent bridging by default.

From EXEC mode the command

     switch# show mac-address-table

displays information in the forwarding tables for the ports.

Entries in the port address table can be "dynamic", "secure", or "static". Usually dynamic entries are a result of incoming packets, but they can also be added manually. Dynamic entries age.

To add a dynamic entry, from global configuration mode use the command "mac-address-table dynamic a i vlan v" where "a" is the MAC address, "i" is the interface to which that address is to be forwarded, and 'v" is the vlan (which defaults to 1 if not specified). For example:

     switch(config)# mac-address-table dynamic 0000.1122.3344 fastEthernet 0/3

To remove a dynamic entry from the port address table, from global configuration mode use the command "no mac-address-table dynamic a" where "a" is the MAC address. For example:

     switch(config)# no mac-address-table dynamic 0000.1122.3344

To remove all dynamic entries from the port address table, from EXEC mode use the command "clear mac-address-table dynamic" For example:

     switch# clear mac-address-table dynamic

The time a dynamic ethernet address remains in the port address table is called the "aging time". The aging time is set from global configuration mode with the command "mac-address-table aging-time s" where "s" is the aging time in seconds. For example:

     switch(config)# mac-address-table aging-time 300

A "secure" port address table entry is a manually entered unicast address that is forwarded to only one port per vlan. Secure entries do not age.

To add a secure entry, from global configuration mode use the command "mac-address-table secure a i vlan v" where "a" is the MAC address, "i" is the interface to which that address is to be forwarded, and 'v" is the vlan (which defaults to 1 if not specified). For example:

     switch(config)# mac-address-table secure 0000.1122.3344 fastEthernet 0/3

To remove a secure entry from the port address table, from global configuration mode use the command "no mac-address-table secure a vlan v" where "a" is the MAC address and "v" is the vlan (which defaults to 1 if not specified). For example:

     switch(config)# no mac-address-table secure 0000.1122.3344

To remove all secure entries from the port address table, from EXEC mode use the command "clear mac-address-table secure". For example:

     switch# clear mac-address-table secure

A "static" port address table entry is a manually entered unicast or multicast address that is retained when the switch restarts. Static entries do not age. A static entry relates a port on whcih an address is recieved and another port on which the packet is forwarded. This is different from a "secure" entry. A secure entry specified the port to which a packet is forwarded regardless of the port on which the address is received. "static" entries can specify different forwarding ports for different ports on which the address is received. The structure of the commands for managing "static" entries is similar to that for "secure" except that when an entry is added two interfaces must be specified. The details of the commands can be obtained using help available on the switch.

To clear all entries from the port address table, from EXEC mode use the command "clear mac-address-table". For example:

     switch# clear mac-address-table

Cisco 4000/7000/7010

One or more ethernet ports can be grouped into a "bridge group". The ports in a bridge group behave as if they are part of a bridge independent of any other bridge group. For bridging to be possible, either IP routing must be disabled from global configuration mode using the command:

     router(config)# no ip routing

or concurrent routing and bridging must be enabled from global configuration mode using the command:

     router(config)# bridge crb

It is necessary both to define a bridge group and to include ports in it. In defining a bridge group you must specify a protocol. The one you should use is "ieee". You create a bridge group from global configuration mode using the command "bridge b protocol p" where "b" is the number of the bridge group number and "p" is the protocol (e.g. ieee).

     router(config)# bridge 1 protocol ieee
You include a port in a bridge group from interface configuration mode using the command "bridge-group b" where "b" is the bridge group number:

     router(config-if)# bridge-group 1

Here is an example, starting in user mode, of a sequence of commands to permit ethernet ports 0/0 and 0/1 and fddi port 3/0 to perform bridging:

     router> enable
     router# configure terminal
     router(config)# no ip routing
     router(config)# bridge 1 protocol ieee
     router(config)# interface ethernet 0/0
     router(config-if)# bridge-group 1
     router(config-if)# interface ethernet 0/1
     router(config-if)# bridge-group 1
     router(config-if)# interface fddi 3/0
     router(config-if)# bridge-group 1

From EXEC mode the command

     router# show bridge group
displays information about interfaces included in currently configured bridge groups. The command
     router# show bridge
displays information in the forwarding tables for currently configured bridge groups. To create a static forwarding entry, from global configuration mode use the command "bridge b address a forward i" where "b" is the bridge group number, "a" is the MAC address of the entry, and "i" is the interface through which the device with address "a" can be reached. For example:
     router(config)# bridge 1 address 0000:1234:abcd forward ethernet 0/0
To remove an entry from the table use the command "no bridge b address a" where "b" is the bridge group number and "a" is the MAC address of the entry.
     router(config)# no bridge 1 address 0000:1234:abcd
To clear the entire table of learned addresses, from global configuration mode use the command "clear bridge":
     router(config)# clear bridge
The time a dynamic ethernet address remains in the port address table is called the "aging time". The aging time is set from global configuration mode with the command "bridge b aging-time s" where "b" is the bridge group number you want to modify and "s" is the aging time in seconds. For example:

     router(config)# bridge 1 aging-time 300

3COM LANplex and CoreBuilder 2500/3500

The following console menu options allow you to manage and examine the bridge ports:

     bridge / port / address / list - show both dynamic and static ethernet addresses associated with each port
     bridge / port / address / add - add a static ethernet address to a port
     bridge / port / address / remove - remove a static ethernet address from a port
     bridge / port / address / flushAll - remove all ethernet address entries, both static and dynamic
     bridge / port / address / flushDynamic - remove all dynamic ethernet address entries only
     bridge / port / address / freeze - change all dynamic ethernet address entries to static entries

The time a dynamic ethernet address remains in the port address table is called the "aging time". The aging time is set by the console menu option:

     bridge / agingTime

VLANs

A vlan is a mechanism for partitioning a switch so that some groups of ports behave independently of others. Each group of ports is a vlan and forwards packets only to other ports inf its own vlan. Each vlan should instantiate its own spanning tree protocol.

When two switches, each with vlans in use, are connected, the packets that pass between the two switches must be encapsulated so that packets from a particular vlan on the originating switch can be passed only to ports of the same vlan on the destination switch. There are different protocols for encapsulating packets with the vlan information. These include:

These encapsulations do not interoperate.

Cisco 2900

Information about vlans is stored in a database kept in memory. This database is called the VTP database in Cisco documentation, but since there will be little discussion of VTP in this manual it will be referred to as the "vlan database". When the switch boots, the vlan database is initialized from the contents of the file "vlan.dat" in flash memory. Since vlan information is not stored in the running configuration, changes to the vlan database cannot be undone by reverting to the startup configuration (e.g. by simply rebooting the switch), but must be explicitly removed from the vlan database. This can be done by reversing every individual vlan change, but this is tedious and prone to errors. The simplest way to remove changes to the vlan database is to delete the file from which the database is initialized and to reload the switch. This restores the database to its default configuration, which is the configuration it should have when students first use the switch. To delete the flash file vlan.dat use the "delete" command from EXEC mode:

     switch# delete flash:vlan.dat
Remember that this has no effect until you reload the switch.

VTP (VLAN Trunk Protocol) is a mechanism whereby switches that are physically connected can exchange information about their VLANs and thereby maintain some consistency among them. There are three VTP modes for the switch:

To see the current VTP mode, from EXEC mode use the command "show vtp status":
     switch# show vtp status
To change the VTP mode, from vlan database mode use the command "vtp m" where "m" is the mode (server, client, or transparent). For example, to disable VTP:
     switch# vlan database
     switch(vlan)# vtp transparent
To see what vlans exist, and what ports belong to them, from EXEC mode issue the command "show vlan":
     switch# show vlan
Certain vlans are present by default. The default ethernet vlan has vlan number 1. There are also default vlans for other protocols (e.g. fddi, token ring, etc.). By default all ethernet ports belong to vlan 1. To associate a port with a vlan other than vlan 1 you must: