Академический Документы
Профессиональный Документы
Культура Документы
Router interfaces
Some of the router interfaces are; Ethernet interfaces, serial interfaces, cable TV, DSL, . . .
Many if the routers Ethernet interfaces support multiple speeds and use auto-negotiation, so for consistency, the router IOS refers
to these interfaces based on the fastest speed. For example:
○ 10-Mbps only Ethernet interface would be configured with the interface ethernet number configuration command
○ 10/100 Ethernet interface would be configured with the interface fastethernet number command, and
○ 10/100/1000 Ethernet interface would be configured with the interface gigabitethernet number command.
Routers use serial interfaces to connect to serial link. Each point-to-point serial link can use high-level data link control
(HDLC, the default) or point-to-point protocol (PPP).
Most common commands used to display the interfaces and their status are show ip interface brief and show interfaces (xxxx)
commands.
Note: we can truncate the interface commands. Ex: instead of show interfaces fastethernet 0/0 we can use sh int fa0/0.
To add some note to the interface we can use the description xxxx command.
Each interfaces has two interface status codes; line status and protocol status.
○ Line status: is the first status code referring to the layer 1 status. Like; cable is not installed, the device on the other
end is powered OFF.
○ Protocol status: the second status code generally referring to the layer 2 status. Its always down if the line status is down .
If line status is up, its down probably because of mismatched data link layer configuration.
To make the router ready to route IPv4 packets on an interface, we need to enable the interface and assign it an IPv4 address.
○ Most router interfaces default to a disabled (shutdown) state and should be enabled with the no shutdown interface subcommand.
○ We need to give the IP address and mask for the routers to route IP packets. To configure the address and mask, use the ip
address address mask, interface subcommand.
Example : refer the figure and the configuration below
Router on a stick (ROAS) uses a router VLAN trunking configuration to give the router a logical router interface connected to each VLAN,
and therefore each subnet that sits on a separate VLAN. The router needs to have an IP address/mask associated with each VLAN on a
trunk. However, the router uses only one physical interface on which to configure the ip address command. Cisco solves this problem by
creating multiple virtual router interfaces, one associates with each VLAN on that trunk. Cisco calls this virtual interfaces
subinterfaces.
ROAS configuration creates a subinterfaces for each VLAN on the trunk, and the router then treats all the frames tagged with that
associated VLAN ID as if they come out of that subinterface.
Note: cisco routers don’t attempt to negotiate trunking, so both the switch and the router need to manually configure trunkin g.
The steps for the routers 802.1Q trunking configuration is as follows
Create unique subinterface for each VLAN that needs to be routed (interface type number.subnet)
Enable 802.1Q trunking, and associate one specific VLAN with the subinterface in subinterface config mode (encryption dot1q
vlan_ID)
Configure IP settings (address and mask) in subinterface config mode (ip address address mask)
Example: configuration for the router B1 of the above network.
Note: the configuration for the ISL is the same with 802.1Q, only change dot1q with isl.
Each 802.1Q trunk has one native VLAN, and when used, the configuration to use that native VLAN differs, with two options for the router
side configuration.
Configure the ip address command on the physical interface, but without an encapsulation command; the router considers this
physical interface to be using the native VLAN.
Configure the ip address command on a subinterface, and use the encapsulation … native subcommand.
Example: shows both configuration options with small change to the above example. In this case VLAN 10 becomes native VLAN.
Note: the show vlans command on the router spells out which router trunk interfaces use which VLANs, which VLANs is the native VLAN,
plus some packet statistics.
A layer 3 switch does two functions: layer 2 LAN switching and layer 3 IP routing. The layer 2 switch function forwards frame inside
each VLAN, but it will not forward frames between VLANs.
Layer 3 switching function needs a virtual interface connected to each VLAN internal to the switch. This VLAN interfaces act like router
interfaces, with an IP address and mask.
Layer 3 switch has IP routing table, with connected routes off each of these VLAN interfaces. These interfaces are also refer red to as
switches virtual interfaces (SVI).
From the above network let's see the layer 3 switch configuration concept with little design modification to the branch offic e.
Secondary IP addressing
Uses multiple networks or subnets on the same data link to increase the number of available IP addresses.
It allows some hosts to have addresses in one IP subnet, others to have address in the second IP subnet, and the router to ha ve address
in both. Both IP subnet would be in the same layer 2 broadcast domain (VLAN).
The negative side of secondary addressing is traffic between hosts on the same VLAN, but in different subnets, require a trip through th
e router.
In the network below, hosts A and B sit on the same LAN, in fact, in the same VLAN. So does R1. no trunking needs to occur an d the
router can route packets to both subnets and even between both subnets.
Example: let's see the routes on R1 for the fig below, for the two subnets on the right side of the figure.
We can see the routes created by using show ip route static command.
IOS adds and removes this static routes dynamically over time based on the outgoing interface is working or not. We should us e the key
word permanent with the ip route command, to tell the IOS not to remove the routes, even when the associated interface fails.
"gateway of last resort" refers to the chosen default route, which in this case is the just configured static route with outgoing
The DHCP process to lease an IP address uses the following four messages between the client and server
Discover : sent by DHCP client to find the willing DHCP server.
Offer : sent by DHCP server to offer to lease to that client a specific IP address (and inform the client of its other parameters)
Request : sent by the DHCP client to ask the server to lease the IPv4 address listed in the offer message.
Acknowledgement : sent by the DHCP server to assign the address, and to list the mask, default router, and DNS server IP address.
Now the problem is that DHCP client have no IP address. To make that work, DHCP messages make use of two special IPv4 address es that
allow a host that has no IP address still be able to send and receive messages on the local subnet:
0.0.0.0 : address reserved for use as source IP address for the host that have no ip address
255.255.255.255 : address reserved as a local subnet broadcast address. Packets sent to this destination address are broadcast on
the local data link, but routers do not forward them to other subnets.
Refer the below example: the case where DHCP client and the server are on the same LAN.
The client, host A sends discover message, with source IP 0.0.0.0 because host A does not have IP address to use yet.
Host A sends the packet to destination 255.255.255.255, which is sent in a LAN broadcast frame, reaching all hosts in the subnet.
The client hopes there is a DHCP server on the local subnet.
then there is a an offer message from the DHCP server with destination address of 255.255.255.255, because host A still does not
have IP address.
On routers we can use extended ping by typing only ping command and pressing enter. This extended ping command does allow you to
refer to the interface, but it must be the full spelled-out interface name, for example, gigabitethernet0/0.
Comparing the standard and extended ping examples in this section, both do the same job in testing connectivity and links from R1
toward host B. However, the extended ping tests the likely route back to the user host (host A), while the standard ping does not.
Traceroute : is diagnosis tool. If the ping is not working this tool helps determine where the problem is.
It systematically helps pinpoint problems by showing how far a packet goes through an IP network before being discarded.
It fully completes identified the routers in the path from source to destination host.
The way traceroute works is related with TTL and TTL exceed messages . . . Refer them.
Some OS like widows OS use tracert and pathping, not traceroute. They are the same.
Like ping we have standard and extended commands.
The below command begins with the Cincy command prompt that would be seen in the Telnet window from host Bench. After telnetting to
Milwaukee, the Telnet connection was suspended because the user pressed Ctrl-Shift-6, let go, and then pressed x and let go. Then,
after establishing a Telnet connection to New York, that connection was suspended with the same key sequence.
The two connections can be suspended or resumed easily. The resume command can be used to resume any suspended connection. To
reconnect to a particular session, the resume command can list a connection ID, which is shown in the show sessions command. (The
The show users command lists all users logged in to the router on which the command is used. This command lists all the sessions,
including users at the console, and those connecting using both telnet and ssh.
The Show ssh lists the same kind of information, but only for the users that are connected using SSH.