Tag Archives: Ethernet

Ethernet Autonegotiation

Generally speaking, network engineers don’t like or use auto negotiation. Historically it just hasn’t worked all that well, and for the older Cisco exams, it was considered best practice to manually configure your Ethernet ports. Frankly, that is not a hard thing to do, given that most of the time your ports all have the same config.

For instance, if we have a switch in a rack that is connected to user host machines, we might write the config as such:

interface range FastEthernet0/1-48
 switchport mode access
 speed 100
 duplex full
no shutdown

… and we have 48 ports of 100base-t full duplex. We can of course set each individual port for legacy purposes – just to make sure that 10Base scanner you have still works, and so on.

Looking to the future though, auto negotiation is going to become more prevalent especially as it is a part of Cisco’s best practices for gigabit Ethernet.

So how does auto negotiation work?

Auto-negotiation works by using a special PULSE called an NLP (or Normal Link Pulse) or in the case of Gigabit Ethernet, Fast Link Pulse (FLP).
These pulses are:

  • transmitted during dead times on the Ethernet link
  • are used to broadcast port capabilities to the port at the other end of the link
  • act as a hello or keep alive signal

In essence, the link will run at the speed of the slower port, and will always prefer to run in full duplex unless otherwise indicated that one of the ports is half duplex.

This is great, because we don’t have to configure each port, as we indicated above. This is not a huge chore for a small network, but in a large network, with a variety of devices on the network, this can be time consuming and cumbersome to do.

As engineers we are lazy/smart so we let the equipment do the work. If I change out a host device from a 100Mb capable device to a new 1000Mb capable device, I would usually have to log in to the switch, find the right port and change the config. With auto-negotiation, I don’t have to do that, I can let the switch figure out the best speed.

Now it is good to bear in mind that some of the older Cisco gear does not allow for auto negotiation, but it is standard on new equipment.

 

Tweet about this on TwitterShare on Google+Share on LinkedInShare on FacebookShare on RedditShare on StumbleUponEmail this to someone

Configuring Switches

Its easy to get sucked into configuring routers because there is so much to configure, so I’m calling time out on the routers and shifting focus to the switches. So lets look at some fun things to do with switches.

 

Configure an IP address and default gateway.

I guess at first I didn’t think too deeply about this because I’ve been using the console port to connect to my switches, but if we are to telnet into them, they need to have an IP address. If I run sh run on my 2950, I get the following after the last physical interface:

!
interface GigabitEthernet0/2
 switchport mode access
 switchport port-security
 shutdown
!
interface Vlan1
 no ip address
 no ip route-cache
 shutdown
!

We have seen Vlan 1 before; it is the default VLAN on the switch. We can use it as the management VLAN if we want to or define a new VLAN for that function. The only issue with using telnet to control the switch is that we need one port for this function.

So to configure the VLAN with an IP address, we need to:

interface Vlan1
 description : Management VLAN
 ip address 172.16.4.2 255.255.255.0
 no ip route-cache
!
ip default-gateway 172.16.4.1
ip http server
!
line con 0
 logging synchronous
line vty 0 4
 password cisco
 logging synchronous
 login

You can see the commands require to make this work. Don’t forget to the password command in the line vty config, or your telnet connection will be refused, This will work, but there is one more password we need to configure. As this stands, we can telnet into the switch, but we cannot enter enable or config mode. We need to set our secret to be able to do that.

s2950(config)#enable secret ccna
s2950(config)#exit

And that should do it. I can now telnet into my switch.

 

Changing the Port Speed and Duplex

Depending on the situation, you may just elect to leave everything in Auto, but there again it is good to know how to hard code the ports, and the commands for speed and duplex are pretty straight forward.

s2950(config-if)#speed ?
 10       Force 10 Mbps operation
 100      Force 100 Mbps operation
 auto     Enable AUTO speed configuration

and …

s2950(config-if)#duplex ?
 auto     Enable AUTO duplex configuration
 full     Force full duplex operation
 half     Force half-duplex operation

 

Changing Multiple ports

This is great if we have just a single or a couple of ports to change but lets say we need to change 12 or 24 or even all 48 ports. That’s quite the task! There is of course a short cut and it is the interface range command.

s2950(config)#int range fast0/1 - 24 
s2950(config-if-range)#speed 100
s2950(config-if-range)#exit
s2950(config)#exit
s2950#

But I hear you say, what if the ports we need to change are not contiguous?
The answer is still the same range command, but with commas,

s2950(config)#int range fa0/4 , fa0/7 , fa0/9 
s2950(config-if-range)#speed 10
s2950(config-if-range)#exit
s2950(config)#exit
s2950#

The big gotcha here is remembering to put the spaces in the right place and remembering to use the full name of the port, not just the number as in the contiguous example above.

 

 

 

Tweet about this on TwitterShare on Google+Share on LinkedInShare on FacebookShare on RedditShare on StumbleUponEmail this to someone

Layers 1 & 2 of the OSI Model

Today I have been looking at Layer 1 and layer 2 devices.

Layer 1 Devices

There are not really any Layer one devices. Layer one really defines the physical interconnect between boxes; the actual cables, wires and fibers that form the connections of the network.

Layer 2 Devices

I remember the days of 10Base Ethernet hubs, where every packet was broadcast on single broadcast domain. These hubs are dumb devices and can waste considerable bandwidth by passing all broadcast and other data, and causing collisions preventing other stations from transmitting data.

CSMA/CD process

Ethernet runs a protocol called Carrier Sense Multiple Access with Collision Detection or CSMA/CD for short – not to be confused with the token ring system CSMA/CA which uses a collision avoidance system by means of a token passed from one host to another. If you like the TV show, Breaking Bad, its a system much like the talking pillow.

So, CSMA/CD however doesn’t do that. All it does is detect collisions on the shared line. Once a collision is detected, both hosts back off the bus, based on a random timer. If at the end of the time period, the bus is free, transmission will continue. Obviously there are issues with this in that this system is inefficient, and slow, wastes bandwidth, and on a busy bus, can cause tremendous congestion.

Collision Domains

Moving from hubs, to switches alleviates this problem. With a hub, because every host is sharing bandwidth, they all sit in the same collision domain. Moving to switches, where each interface of the switch is managed, each switch interface becomes its own collision domain (Micro segmentation). So for instance, a 24 port switch now has 24 collision domains, where as a 24 port hub has one. A bridge will segment a collision domain, although it will not segment a broadcast domain.

Broadcast Domains

This is another term to get familiar with; the broadcast domain defines the spread of broadcast packets. On a single hub, the broadcast domain was the entire hub and on a hub based network, the borders of the broadcast domain are delineated by routers and hosts. With switches, the entire switch is a broadcast domain, just like a hub, until you start using VLANs.

The Mac Address Table

Switches use the MAC address to intelligently route frames rather than broadcast them across all ports. This is achieved by using a MAC address table. The MAC address table has a number of different names that you might see:

  • CAM
  • MAC table
  • Bridging
  • Switching

When a frame enters the switch, the SOURCE MAC address is checked, and if it is not in the MAC address table, it is added.

Be aware that entries in the table will age out after 300 seconds. This is configurable.

The destination MAC address is then checked against the MAC address list and if it is present, the frame is sent on its way (Forwarded). If it is not present, the frame is FLOODED to every port, looking for the destination device. Once that device replies, the MAC address table is updated and a route established. If however there is no destination address response OR the destination is on the same port as the source (a hub feeding a switch for instance), the frame is FILTERED or dropped.

  • Floodingunknown unicast frame, sent out on all ports (except the input port)
  • Forwarding – sent to a single known port
  • Filtering – dropped

The MAC address table ages over time and that time can be set, but is default to 300 seconds.

Broadcast frames are sent out on MAC address:  ff.ff.ff.ff.ff.ff.ff.ff’ and are itnended for ALL recipients. Remember the unicast is sent to all but is looking for one recipient.

To limit the scope of this broadcast, you can use virtual LANs (VLANs)

 How is the frame processed?

  • Store and forward – default on newer systems.
  • Cut through
  • Fragment free

Store and Forward – stores the frame (while checking MAC table). Last few bites are the FCS (Frame Check Sequence) and this is checked against the frame payload. If the check passes, the frame can be forwarded. This method adds latency and memory/cpu overhead.

Cut Through – forwards the frame as it comes in but does not check the FCS. Very fast but no error detection.

Fragment Free – Works on the principle that if there is damage to the frame it will be evident in the first 64 bytes so this is the only data that is checked. If this is ok, the frame is forwarded. FCS is not checked.

Other things to remember

Bandwidth – the bandwidth of a hub is shared. The bandwidth of a switch is on a per port basis meaning that a fast Ethernet port in full duplex mode, can transfer data at 200Mb/s. That is 100Mb/s in each direction at the same time.

 

Tweet about this on TwitterShare on Google+Share on LinkedInShare on FacebookShare on RedditShare on StumbleUponEmail this to someone

Ethernet Cables and Physical Connections

Cabling and Ethernet.

This is one of those subjects where my mind goes “oh I know this” so I have to pay special attention or I’ll gloss over it and miss little details that will trip me up on the test. This subject is a little bit of a history lesson, a gander down memory lane if you will, because during the 90’s and 2000/2001 I was selling products into the networking space. I received plenty of classroom time on Ethernet products, fiber channel, serial & USB, HDLC, ATM, SONET and Infiniband layer 1/2 devices. So, time to refresh the memory!

Ethernet Standards

Xerox invents 3Mb/s Ethernet in 1973.

Ethernet (10Mbs) Standardized in 1982

  • 10base 5   500M   Good coax IEEE-802.3
  • 10Base 2   200M   cheap coax IEEE-802.3a
  • 10Base T   100M   Twisted pair   IEEE-802.3i

 

IEEE802.3u – Fast Ethernet (100Mbs) Standardized in 1995

  • 100Base-TX
  • 100Base-T4
  • 100base-FX (420M fiber)
  • 100Base-SX (Not IEEE standard)
  • 100Base-BX (Long haul fiber up to 40km
  • 100Base-LX (10km on fiber)

There are a ton of additional Ethernet specs and standards to include POE, Gigabit and 10Gigabit Ethernet links as well as copper/Fiber variants.

Gigbait Ethernet –  Standardized in 2000

IEEE802.3u    100M
IEEE082.3ab   100M

The two standard use differing signalling schemes, but both run on Cat5e or Cat6 cables.

Ethernet Cablingeth_cbl_bsc_ 3

For the purposes of the CCENT, I am just going to focus on fast Ethernet.
A fast Ethernet cable is usually Cat5e or Cat6 UTP, terminated with an RJ45. The standard (US) pin out is as follows (known as 568B – A is used for European cables and cross over cables)

  • 1    TX+
  • 2    TX-
  • 3    RX+
  • 4
  • 5
  • 6    RX-
  • 7
  • 8

For a patch cable or straight through cable, each pin connects to the same pin at the other end, but for a roll over cable, we connect the TX to RX and vice versa

So what cables do I use for what connections?

crossed-or-not-crossed

This handy little graphic shows what connects with what. Now often a straight through cable can be used rather than a cross over cable, because modern Ethernet ports use MDIX, which automatically figures out what connection is required and configures itself accordingly, however for the exam we do need to understand what cables go where and why.*

 

* This is one reason why I have a lab of real Cisco equipment to play with.

And if you aren’t sure what the symbols mean on the graphic, here is another graphic that might help!

Slide2

 

 

Tweet about this on TwitterShare on Google+Share on LinkedInShare on FacebookShare on RedditShare on StumbleUponEmail this to someone