Welcome to Tech Support Forum home to more then 136,000 problems solved. Issues have included: Spyware, Malware, Virus Issues, Windows, Microsoft, Linux, Networking, Security, Hardware, and Gaming Getting your problem solved is as easy as:
1. Registering for a free account
2. Asking your question
3. Receiving an answer

Registered members:
* Get free support
* Communicate privately with other members (PM).
* Removal of this message
* See fewer ads.
* And much more..

 



Want to know how to post a question? click here Having problems with spyware and pop-ups? First Steps
Go Back   Tech Support Forum > Networking Forum > Networking Support
User Name
Password
Site Map Register Donate Rules Blogs Mark Forums Read


Networking Support General Networking Support Forum

Reply
 
LinkBack Thread Tools
Old 07-06-2009, 03:52 PM   #1 (permalink)
Registered User
 
Join Date: Jul 2009
Posts: 6
OS: xp pro sp3


routing & switching

Can anyone explain to me the principles of routing & switching & their key differences? I am confused over these two aspects.
Also what steps does a switch take in building a forwarding database or switching table & how is that used to forward packets?

This is really driving me nuts. Any help appreciated.

Thanks in advance.
jaye1234 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Important Information
Join the #1 Tech Support Forum Today - It's Totally Free!

TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free.

Join TechSupportforum.com Today - Click Here

Old 07-06-2009, 03:59 PM   #2 (permalink)
Registered User
 
Prometheus_Fire's Avatar
 
Join Date: Jan 2007
Posts: 134
OS: Win2K, WinXP, Win Vista, Win2K3, Win2K8, IOS


Re: routing & switching

Put simply:
  • Routing operates at layer 3 of the OSI model and is concerned with IP addressing and getting IP packets to remote networks. This is where IP addresses work.
  • Switching works at layer 2 of the OSI model and is concerned with flooding, forwarding or filtering data frames to connected devices on the same network. This is where MAC addresses work.

Hope this helps. If you feel your question has been answered, don't forget to mark it as SOLVEd.
__________________
Scintillate, scintillate, asteroid minific;
Feign do I fathom your nature's specific
Exaltedly set on the aether capacious
A reasonable facsimile of a gem carbonaceous.

Last edited by Prometheus_Fire; 07-06-2009 at 04:00 PM. Reason: Typo
Prometheus_Fire is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 07-07-2009, 12:11 AM   #3 (permalink)
Registered User
 
Join Date: Jul 2009
Posts: 6
OS: xp pro sp3


Re: routing & switching

Thanks prometheus fire for your reply.
I understand that a router is layer 3 & works on the ip address & that a switch is layer 2 & works using MAC addresses.
What i was concerned with is how the router bases its forwarding decisions compared to how a switch works. You say a switch is concerned with flooding, I thought it was a hub that flooded data out all ports. If a switch can flood, forward or filter data frames how does it make the decision to do either & how does it decide on the exit port?
jaye1234 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 07-07-2009, 02:44 AM   #4 (permalink)
Registered User
 
Prometheus_Fire's Avatar
 
Join Date: Jan 2007
Posts: 134
OS: Win2K, WinXP, Win Vista, Win2K3, Win2K8, IOS


Re: routing & switching

That's only partially correct.

Switching:
  1. When a switch receives a frame it looks at the source MAC address first.
  2. If it doesn't have an entry in its Content Addressable Memory (CAM or Area which the MAC address table lives) it adds the source MAC address and port into its CAM.
  3. Flooding: The switch then looks at the destination MAC address and if it doesn't have an entry in its MAC address table it treats the frame as an unknown unicast and it floods it out all switchports EXCEPT (This is important) the one it received it on.
  4. Forwarding: If the switch does have an entry in its MAC address table for the destination MAC address it then forwards the frame out of the switchport that the destination MAC address is mapped to in its MAC address table.
  5. Filtering: If a switch receives a frame with a MAC address that it knows exists on the switchport it received the frame on it will filter or drop the frame.

Routing

As for how a router makes forwarding decisions, it depends in part on the routing protocol you use. Basically though where switching only cares about host based hardware addressing routing only cares about the network portion of IP addressing.

For instance: If you have 2 routers and they share a common network segment on 192.168.0.0/30. Router1 serial 0/0 will have an external IP address of 192.168.0.1 and Router2 serial 0/0 will have an external IP address of 192.168.0.2. This way they can communicate with each other.

On top of this Router1 has a directly connected network of 172.16.1.0/24 (It's Ethernet 0/1 internal IP address is 172.16.1.254) and Router2 has a directly connected network of 10.2.2.0/24 (It's Ethernet 0/1 internal IP address is 10.2.2.254). The routers only advertise the network portions of the IP addressing scheme to each other via their routing updates across their serial interfaces. Neither of them care about the last octet.

This is a messy explanation, but using the information above network traffic will basically be passed like so:
  1. ComputerA (172.16.1.10) wants to request a web page from ServerB (10.2.2.2).
  2. ComputerA sends an ethernet frame via a switch to its default gateway Router1 (172.16.1.254)
  3. Router1 strips off the ethernet header and trailer and adds a layer 3 header.
  4. Router1 knows that the 172.16.1.0/24 network is attached to Router2 so it sends the packet over its serial 0/0 interface (192.168.0.1) to the Router2 serial 0/0 interface (192.168.0.2).
  5. Router2 receives the packet and strips off the layer 3 information.
  6. Router2 then sends the packet over it's internal interface (10.2.2.254) via an ethernet switch on the 10.2.2.0/24 network to ServerB 10.2.2.2.
  7. ServerB then sends the requested data via a switch back to its default gateway: Router2 (10.2.2.254).
  8. Router2 strips off the ethernet header and trailer and adds a layer 3 header.
  9. Router2 knows that network 172.16.1.0/24 is attached to Router1 so it sends the packet to it over their serial interfaces.
  10. Router1 receives the packet and strips off the layer 3 information.
  11. Router1 sends the frame via a switch to ComputerA (172.16.1.10).

NB: During this process while the source and destination IP addresses don't change, the source and destination MAC addresses are altered to reflect the sending and next devices.

Clear as mud?
__________________
Scintillate, scintillate, asteroid minific;
Feign do I fathom your nature's specific
Exaltedly set on the aether capacious
A reasonable facsimile of a gem carbonaceous.

Last edited by Prometheus_Fire; 07-07-2009 at 02:50 AM. Reason: Addendum
Prometheus_Fire is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -7. The time now is 06:37 AM.



Copyright 2001 - 2009, Tech Support Forum
Home Tips Plus | Outdoor Basecamp | Automotive Support Forum

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85