cns-lab_11

Upload: hemin-essa

Post on 14-Apr-2018

225 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/27/2019 CNs-Lab_11

    1/5

    February 2013

    Dr. Shareef CNs Lab 11 Page 1

    Practical 11

    Router configuration

    In this session I will show how can you configure the router. For demonstration purpose I

    used packet tracer software. Create a simple topology by dragging dives on workspace as

    shown in the figure below:

    Click inside the Router and select CLI and press Enter to get started. Setup mode starts

    automatically if there is no startup configuration present. The answer inside the squarebrackets [ ], is the default answer. If this is the answer you want, just press enter. Pressing

    CTRL+C at any time will end the setup process, shut down all interfaces, and take you to

    user mode (Router>).

    You cannot use setup mode to configure an entire router. It does only the basics. For

    example, you can only turn on either RIPv1 or Interior Gateway Routing Protocol (IGRP),

    but not Open Shortest Path First Protocol (OSPF) or Enhanced Interior Gateway Routing

    Protocol (EIGRP). You cannot create access control lists (ACL) here or enable Network

    Address Translation (NAT). You can assign an IP address to an interface, but not to a

    subinterface. All in all, setup mode is very limited.

    --- System Configuration Dialog --- Continue with configuration dialog?

    [yes/no]:

    Write no and press enter. To get router prompt

    You are now connected to the Router and are in user mode prompt. The prompt is broken

    down into two parts, the hostname and the mode. "Router" is the Router0's hostname and

    ">" means you are in user mode.

    Press RETURN to get started

    Router>

    User mode is indicated with the '>' next to the router name. In this mode you can look at thesettings but cannot make changes.

    In Privilege mode (indicated by the '#', you can do anything). To get into the privilege mode

    the keyword is enabled.

    Next type the command enable to get to the privileged mode prompt.

    Router > enable

  • 7/27/2019 CNs-Lab_11

    2/5

    February 2013

    Dr. Shareef CNs Lab 11 Page 2

    Router#

    To get back to the user mode, simply type disable. From the user mode type logout orexit

    to leave the router.

    Router#disableRouter>

    Router>exit

    Router con0 is now available

    Press RETURN to get started

    Press enter to get back router prompt

    Router>

    You are now in User mode. Type ?to view all the available commands at this prompt.

    Router>?

    From privilege mode you can enter in configuration mode by typing configure terminal you

    can exit configuration mode type exit or +z

    Router>enable

    Router#config terminal

    Router(config)#exit

    Router#

    To view all commands available from this mode type ? and press enter. This will give you the

    list of all available commands for the router in your current mode. You can also use the

    question mark after you have started typing a command. For example if you want to use a

    show command but you do not remember which one it uses 'show ?' Will output all

    commands that you can use with the show command.

    Router#show ?

    access-expression List access expression

    access-lists List access lists

    backup Backup status

    cdp CDP information

    clock Display the system clock

    cls DLC user information

    compress Show compression statistics

    configuration Contents of Non-Volatile memory--More--

    Router boot and initial Configuration:

    Do some basic configuration as you have done before with switch devices.Set a : name, password, enable secret , set IP address, ... etc.

  • 7/27/2019 CNs-Lab_11

    3/5

    February 2013

    Dr. Shareef CNs Lab 11 Page 3

    Routing: Implementing Static Routing:

    Understanding the Purpose of the Router:

    A PC is connected to the network 192.168.1.0 with IP address 192.168.1.20 and connected to

    the gateway (Router IP) 192.168.1.1, with a connection between the two routers in network

    192.168.2.0, where the R1 IP address is 192.168.2.1 and R2 IP address is 192.168.2.2, and

    finally R2 is connected to the other network 192.168.3.0 with IP address 192.168.3.1 and the

    PC at the right is connected at IP address 192.168.3.20.

    Now if I were logging console at R1, I would be able to ping the network 192.168.2.0, and

    the network 192.168.1.0 because R1 is Directly Connected to those networks, now if R1

    pings network 192.168.3.0, he will not get any replies cause R1 does not now that this

    network Exist, although R1 is connected to R2 that is connected to network 192.168.3.0 but

    R1 is not Smart enough to understand that R2 has the ability to get to that network, likewise

    R2 knows how to reach Network 192.168.3.0 & 192.168.2.0, but doesnt know network

    192.168.1.0 exist, the result is that PC at the Left cant communicate to the PC at the right,

    because the routers are not yet routing.

    How Static Routing Can Help:

    Static routing is when you as an administrator get on the routers and start telling them where

    to go (Manually).

    Now we will access Router1 (R1) and see what interfaces is connected to, as from the (show

    ip interface brief) command will show its connected Interfaces as in the above Picture,

    FE0/0 is IP address 192.168.1.1 & the Serial Interface is 192.168.2.1

    Then by using the same command (show ip interface brief) in R2, we will see that its

    connected interface FE0/1 IP address is 192.168.3.1 & the Serial interface IP is 192.168.2.2.

  • 7/27/2019 CNs-Lab_11

    4/5

    February 2013

    Dr. Shareef CNs Lab 11 Page 4

    After we have seen the two Routers with their Connection, we will move back to Router 1

    and see what Network Address it knows. Lets do the Following:

    R1#show ip route

    Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

    N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

    E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

    i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area

    * - candidate default, U - per-user static route, o - ODR

    P - periodic downloaded static route

    Gateway of last resort is not set

    C 192.168.1.0/24 is directly connected, FastEthernet0/0

    C 192.168.2.0/24 is directly connected, Serial0/1/0

    From the Above we see R1 had learned that network 192.168.1.0 & 192.168.2.0 are

    connected to its interfaces, the Codes in the above tells you how the Router learned that

    Network address by which Method, in our Picture it says it has Learned the Two Network

    Address because they are directly connected to Router interfaces which is method Cwhich is

    written at the Beginning of the line which refers to Connected means (those Networks are

    Directly Connected to the Router).

    BUT : Router1 (R1) cant connect to the network 192.168.3.0 & Router2 (R2) cant connect

    to Network 192.168.1.0, so lets solve that using static routing as following:

    R1(config)#ip route 192.168.3.0 255.255.255.0 ?

    A.B.C.D Forwarding router's address

    Ethernet IEEE 802.3

    FastEthernet FastEthernet IEEE 802.3

    GigabitEthernet GigabitEthernet IEEE 802.3z

    Loopback Loopback interface

    Null Null interface

    Serial Serial

  • 7/27/2019 CNs-Lab_11

    5/5

    February 2013

    Dr. Shareef CNs Lab 11 Page 5

    Vlan Catalyst Vlans

    R1(config)#ip route 192.168.3.0 255.255.255.0 192.168.2.2

    Ok as you see above we will write down the Command IP route where this is the Syntax for

    Static Route, then we will choose the Destination networkaddress you want to go to, so Iwill write network 192.168.3.0 with its Mask. Then Question Mark to see what I have to get

    to that network.

    Then we have to specify the IP address of the next hop (Router) that let you reach the

    network 192.168.3.0 with subnet mask 255.255.255.0 , which is 192.168.2.2.

    It Means; I will use an IP address (192.168.2.2) that make me able to reach a network which

    previously I dont know about it which is (192.168.3.0).

    Lets See after the executing the previous Command if R1 has the information for reaching

    network 192.168.3.0 or not:

    R1#show ip route

    Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

    D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

    N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

    E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

    i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area

    * - candidate default, U - per-user static route, o - ODR

    P - periodic downloaded static route

    Gateway of last resort is not set

    C 192.168.1.0/24 is directly connected, FastEthernet0/0

    C 192.168.2.0/24 is directly connected, Serial0/1/0

    S 192.168.3.0/24 [1/0] via 192.168.2.2

    As you might see above it has the Method Swhich means Static route configured.

    GOOD LUCK