ROUTING AND SWITCHING
CONTENTS
i. Routing Protocols (Dynamic routing i.e., RIP, OSPF, EIGRP)
ii. DHCP
iii. Switching (VLANs)
iv. IP telephony
ROUTER
A router is a device that connects two or more packet-switched networks or subnetworks. It serves two
primary functions: managing traffic between these networks by forwarding data packets to their
intended IP addresses, and allowing multiple devices to use the same Internet connection.
❖ In order to direct packets effectively, a router uses an internal routing table — a list
of paths to various network destinations. The router reads a packet's header to
determine where it is going, then consults the routing table to figure out the most
efficient path to that destination. It then forwards the packet to the next network in
the path.
[Link] Routing.
[Link] Routing.
DYNAMIC ROUTING
1. RIP (Router Information Protocol)
• Application layer protocol used to route data packets by finding the best hop counts
• A hop count is the total number of intermediate devices such as routers through which a
given piece of data must pass between the source and destination, instead of flowing
directly over a single wire.
• RIP is not scalable in large and very large networks with 15 routers or more thus the
maximum hop count for RIP routers is 15.
❖ Deals with Known Networks
2. OSPF (Open shortest Path First)
• It’s based-on link state routing.
• Link state routing is a method in which each router shares its neighborhood’s knowledge
with every other router in the internetwork forming a link state database. In this
database, each router in the network understands the network topology then makes a
routing table depend on this topology.
• Each router chooses the best routes to add to its routing table based on the learned LSDB
(Link state database) information.
• For handling routing efficiently and in a timely manner OSPF divides an Autonomous
system into areas.
• Unlimited Hop counts.
NOTE: An autonomous system (AS) is a network or a collection of networks that are all
managed and supervised by a single entity or organization.
❖ You must set router ID (any number)
❖ You should know known networks.
❖ You should know the wild card mask.
❖ You should know the area.
❖ You should know the clock rate (64000)
-When you set the clock rate for a serial interface, you are setting the
speed of the interface, in other words, the speed of the interface (bandwidth
meaning the rate of data transfer)
3. EIGRP (Enhanced interior Gateway Routing Protocol)
• Designed to be used with in a single autonomous system.
• Its goal is to learn the best route to any given subnet with in a network.
DHCP
- Ip dhcp pool <Name>
- Network <Choose network in which Ip ranges will be selected>
- Default <Ip address of the router>
- Exit
= Ip dhcp exc <Select Ip range you want to exclude from being assigned by DHCP>
= Exit
-show run start
VLANs
Virtual local area networks, or VLANs, have become important as network complexity has exceeded the
capacity of typical local area networks (LANs). Originally, a LAN connected a group of computers and
associated devices to a server via cables in a shared physical location (hence the term “local”). Many
LANs now connect devices via wireless internet, rather than Ethernet, although most LANs use a
combination of both connectivity types. Over time, organizations have grown in their networking needs,
requiring solutions that enable networks to grow in size, flexibility, and complexity.
VLANs circumvent the physical limitations of a LAN through their virtual nature, allowing organizations
to scale their networks, segment them to increase security measures, and decrease network latency.
NB: A VLAN allows different computers and devices to be connected virtually to each other as
if they were in a physical Local Area Network.
Why would you use a VLAN?
Cost Effective
VLANs offer more flexibility than nonvirtual networking solutions.
- VLANs can be configured and assigned based on port, protocol, or subnet criteria,
making it possible to alter VLANs and change network design when necessary.
VLANs decrease the amount of administrative oversight required.
- VLANs allow network administrators to automatically limit access to a specified group of
users by dividing workstations into different isolated LAN segments.
How to create a VLAN
- Enable
- Configure terminal
- VLAN 10 <Select Vlan>
- Name <Give Vlan a name>
- Exit
❖ Assign ports to the Vlan
- Interface fa0/1-5 <Select a port or ports to assign to Vlan>
- Switchport mode access <Creates an access port>
- Switchport access Fa0/1 < assigns an interface to the specified VLAN.>
- Exit
❖
❖ Assign an Ip address to the Vlan
- Interface Vlan 10
- Ip address <Ip of your choice>
- Exit
-Show run start
-Show Ip int brief
IP TELEPHONY
Tasks 1 : Configure interface FastEthernet 0/0 and DHCP server on Router A (2811 router)
Configure the FastEthernet 0/0 interface with [Link]/24 ip address. Don't forget to enable
the interface with the no shutdown command!
Router A enable
RouterA configure terminal
Router A(config) interface FastEthernet0/0
Router A(config-if) ip address [Link] [Link]
Router A(config-if) no shutdown
The DHCP server is needed to provide each IP phone connected to the network with an IP
address.
Router A(config)#ip dhcp pool VOICE #Create DHCP pool named VOICE
Router A(dhcp-config) network [Link] [Link] (DHCP network 192.168.10 with /24
mask)
Router A(dhcp-config) default-router [Link] (The default router IP address)
Router A(dhcp-config) option 150 Ip [Link] (Mandatory for VoIP configuration.)
After configuring the ISR router, wait a moment and check that ‘IP Phone 1’ has received an IP
address by placing your cursor over the phone until a configuration summary appears.
Tasks 2: Configure the Call Manager Express telephony service on Router A
You must now configure the Call Manager Express telephony service on Router A to enable
VoIP on your network.
Router A(config) telephony-service (Configuring the router for telephony services)
Router A(config-telephony) max-dn 5 (Define the maximum number of directory numbers)
Router A(config-telephony) max-ephones 5 (Define the maximum number of phones)
Router A(config-telephony) ip source-address [Link] port 2000 (IP Address source)
Router A(config-telephony) auto assign 4 to 6 (Automatically assigning ext numbers to
buttons)
Router A(config-telephony) auto assign 1 to 5 (Automatically assigning ext numbers to
buttons)
Task 4: Configure a voice vlan on switch A
Apply the following configuration on Switch interfaces. This configuration will separate voice
and data traffic in different vlans on Switch. data packets will be carried on the access vlan.
switch A(config) interface range fa0/1 – 5 (Configure interface range)
switch A(config-if-range) switchport mode access
switch A(config-if-range) switchport voice Vlan 1 (Define the VLAN on which voice packets
will be handled)
Task 5: Configure the phone directory for IP Phone 1
Although ‘IP Phone 1’ is already connected to switch A, it needs additional configuration before
being able to communicate. You need to configure Router A CME to assign a phone number to
this IP phone.
Router A(config) ephone-dn 1 (Defining the first directory entry)
Router A(config-phone-dn) number 101 (Assign the phone number to this entry)
Task 5: Verify the configuration
Ensure that the IP Phone receives an IP Address and a the phone number 54001 from Router A
(this can take a short while).
Task 6: Configure the phone directory for IP Phone 2
Connect IP Phone 2 to switch A and power the phone ON using the power adapter (Physical
tab).
Router A(config) ephone-dn 2 (Defining the first directory entry)
Router A(config-phone-dn) number 102 (Assign the phone number to this entry)
Task 7: Verify the configuration
Ensure that the IP Phone 2 receives an IP Address and the phone number 54002 from Router A
(this can take a short while). Same procedure as task n°5.
Dial 54001 and check if IP phone 1 correctly receives the call.