* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download sg300_vlan_setup - Cisco Support Community
Survey
Document related concepts
Computer network wikipedia , lookup
Distributed firewall wikipedia , lookup
Piggybacking (Internet access) wikipedia , lookup
Serial digital interface wikipedia , lookup
Network tap wikipedia , lookup
Zero-configuration networking wikipedia , lookup
Nonblocking minimal spanning switch wikipedia , lookup
Deep packet inspection wikipedia , lookup
Packet switching wikipedia , lookup
Virtual LAN wikipedia , lookup
Multiprotocol Label Switching wikipedia , lookup
Transcript
Jun 8, 2012 7:44 AM David Hornstein (in response to Gavin Stewart) Hi Gavin Look closely at the following diagram. It roughly drawn by MS Paint, but a picture is worth a thousand words. Print the diagram below, and follow closely the story as it unfolds. There are two Hosts (PCs ) connected on the Sg300-10 switch., in my example above A PC on switch port 1, IP address=192.168.1.22 in VLAN1 IP host on switch port 7 with IP= 10.0.3.111 in VLAN 2. Lets say the host in VLAN 2, which I will call host2 wants to 'talk' to the host in VLAN 1, which i will call host1. Here is a vervbalized story of how host2 wants to talk with host1 In general IP host’s, can only talk to other IP hosts in their IP network. But Host2 wants to communicate or send a packets to host1 . Host2 has a default gateway, which is the IP address of VLAN2 on the SG300-10P In other words it sends packets to the switches at IP address 10.0.3.101, and lets the switch decide how and where to forward the packet destined for host1. Host1 has a default gateway, but that is the IP address of the router, 192.168.1.1. So, when Host1 tries to communicate anywhere outside it's known network, it just forwards the packet to the WAN router , and the wan router has to make a decision as to where to forward a packet. Notice the routing table on the right side of the router. This table shows only two entries in my example. The first entry with just about all the zero's in it is called a default route. This default route basically tells the router, if you don't know where to send the packet, send it out the WAN interface to the next hop of 76.0.1.223. (In other words it lets the internet or service provider, make the next decision as to where to send a packet next.) The second Router route entry tells the router how to get to the 10.0.0.0 /22 network. This static route statement, keyed in manually by me, if verbalized in english tells the router the following; to get to the 10.0.0.0 /22 network, your next hop will be 192.168.1.21 on vlan 1. Ah, 192.168.1.21 is the IP address of VLAN1 on the switch. ok, That's the rules. So now we sort of understand some rules, so lets look at where the packets flow around this hypothetical network... host2 wants to talk to host 1. Host2 send a packet, that is intercepted by switch interface vlan2 , IP address 10.0.3.101 The switch then looks in it's internal route table, but it knows where the 192.168.1.0 network is, because it has a interface directly connected to vlan1. That SG300-10 switch interface has an ip address of 192.168.1.21. Ok so, the packet gets to HOST1 because the switch actually knows where host1 is. But what happens when host1 wants to reply to host2. host1 ( the PC) looks in it's built in and hidden route table , but all it has is a default gateway of 192.168.1.1. This default gateway is like the default route on the WAN router. host1 just forwards the packets from unknown sources to it's default gateway, the router. So, host1 (192.168.1.responds to host2 (10.0.3.111), by sending it's response to the router. (Host1 can only assume that this traffic from 10.0.3.111 came from the router. yeah pretty dumb.) The router looks up it route table, but it knows where the 10.0.3.0 network is. It looked through it's route table and says to itself. Oh, i have to forward the packet from host1 to my host at 192.168.1.21, because it know where 10.0.0.0 network is. The router doesn't know that 192.168.1.21 is a switch. the router lets that device at 192.168.1.21 worry about forwarding host1 response to host2. That's basically the story, and explains what the wan router should have a static route . Most routers, even domestic routers allow for the addition of a static route. I hope this story helps you and other understand the packet flow..may have to read this story a few times. regards Dave