Saturday, June 26, 2010

3.6.1 scripts

hostname HQ
no ip domain-lookup
enable password cisco
banner motd #Welcome to Router HQ#
line console 0
password cisco
login
line vty 0
password cisco
login
int s0/0/0
ip add 10.0.0.1 255.255.255.252
clock rate 64000
no shutdown
int s0/0/1
ip add 10.0.0.5 255.255.255.252
no shutdown
clock rate 64000
int s0/1/0
ip add 10.0.0.9 255.255.255.252
no shutdown
clock rate 64000
int s0/1/1
ip add 209.165.201.2 255.255.255.252
no shutdown
clock rate 64000
int fa0/0
ip add 192.168.0.129 255.255.255.224
no shutdown
int fa0/1
ip add 192.168.0.161 255.255.255.224
no shutdown
ip route 192.168.1.0 255.255.255.0 s0/0/0
ip route 0.0.0.0 0.0.0.0 s0/1/1
end
copy running-config startup-config
startup-config
reload
y




hostname B1
no ip domain-lookup
enable password cisco
banner motd #Welcome to Router B1#
line console 0
password cisco
login
line vty 0
password cisco
login
int s0/0/0
ip add 10.0.0.2 255.255.255.252
clock rate 64000
no shutdown
int fa0/0
ip add 192.168.1.1 255.255.255.192
no shutdown
int fa0/1
ip add 192.168.1.65 255.255.255.192
no shutdown
int fa1/0
ip add 192.168.1.129 255.255.255.192
no shutdown
int fa1/1
ip add 192.168.1.193 255.255.255.192
no shutdown
ip route 0.0.0.0 0.0.0.0 s0/0/0
end
copy running-config startup-config
startup-config
reload
y





hostname B2
no ip domain-lookup
enable password cisco
banner motd #Welcome to Router B2#
line console 0
password cisco
login
line vty 0
password cisco
login
int s0/0/0
ip add 10.0.0.6 255.255.255.252
clock rate 64000
no shutdown
int fa0/0
ip add 172.16.0.1 255.255.252.0
no shutdown
int fa0/1
ip add 172.16.4.1 255.255.252.0
no shutdown
int fa1/0
ip add 172.16.8.1 255.255.252.0
no shutdown
int fa1/1
ip add 172.16.12.1 255.255.252.0
no shutdown
ip route 0.0.0.0 0.0.0.0 s0/0/0
end
copy running-config startup-config
startup-config
reload
y



hostname B3
no ip domain-lookup
enable password cisco
banner motd #Welcome to Router B3#
line console 0
password cisco
login
line vty 0
password cisco
login
int s0/0/0
ip add 10.0.0.10 255.255.255.252
clock rate 64000
no shutdown
int fa0/0
ip add 172.20.0.1 255.255.224.0
no shutdown
int fa0/1
ip add 172.20.32.1 255.255.224.0
no shutdown
int fa1/0
ip add 172.20.64.1 255.255.224.0
no shutdown
int fa1/1
ip add 172.20.96.1 255.255.224.0
no shutdown
ip route 0.0.0.0 0.0.0.0 s0/0/0
end
copy running-config startup-config
startup-config
reload
y

hostname ISP
no ip domain-lookup
enable password cisco
banner motd #Welcome to Router ISP#
line console 0
password cisco
login
line vty 0
password cisco
login
int s0/0/0
ip add 209.165.201.1 255.255.255.252
clock rate 64000
no shutdown
int fa0/0
ip add 209.165.200.225 255.255.255.252
no shutdown
ip route 192.168.1.0 255.255.255.0 s0/0/0
ip route 10.0.0.0 255.255.255.252 s0/0/0
ip route 10.0.0.4 255.255.255.252 s0/0/0
ip route 10.0.0.8 255.255.255.252 s0/0/0
end
copy running-config startup-config
startup-config
reload
y

13 comments:

  1. HQ is missing 2 static routes.
    ISP needs 7 static routes.
    Help please. thanks

    ReplyDelete
    Replies
    1. ISP
      ip route 192.168.1.0 255.255.255.0 s0/0/0
      ip route 10.0.0.0 255.255.255.252 s0/0/0
      ip route 10.0.0.4 255.255.255.252 s0/0/0
      ip route 10.0.0.8 255.255.255.252 s0/0/0
      ip route 192.168.0.128 255.255.255.128 s0/0/0
      ip route 172.16.0.0 255.255.240.0 s0/0/0
      ip route 172.20.0.0 255.255.128.0 s0/0/0

      Delete
    2. This comment has been removed by the author.

      Delete
  2. I do not understand how you came up with the subnet masks for the 172.16.0.0 and 172.20.0.0 networks. Could someone please help me out a little bit?

    ReplyDelete
  3. Those are summary routes.

    Add up all the matching consecutive bits of all subnet Network Addresses you want to summarize. That number becomes your mask.

    In the case of 172.16.0.0, 172.16.4.0, 172.16.8.0 & 172.16.12.0

    There are 20 matching consecutive bits so your mask is 255.255.240.0 (8+8+4=20)

    In binary:

    10101100.00010000.0000 | 0000.00000000 (172.16.0.0)
    10101100.00010000.0000 | 0100.00000000 (172.16.4.0)
    10101100.00010000.0000 | 1000.00000000 (172.16.8.0)
    10101100.00010000.0000 | 1100.00000000 (172.16.12.0)

    ReplyDelete
  4. 172.16.0.0 & 172.16.12.20 is mentioned in the topolgy itself.

    ReplyDelete
  5. IN HQ static route two are missing?

    ReplyDelete
  6. Your 2 missing routes for HQ are:
    ip route 172.16.0.0 255.255.240.0 s0/0/1
    This points to B2
    ip route 172.20.0.0 255.255.128.0 s0/1/0
    This points to B3

    ReplyDelete
  7. This comment has been removed by the author.

    ReplyDelete
  8. The static route for ISP router, I dont understand how you came up with 192.168.0.128 255.255.255.128 ? Can you explain please

    ReplyDelete
  9. Your 2 missing routes for HQ are:
    ip route 172.16.0.0 255.255.0.0 s0/0/1
    This points to B2
    ip route 172.20.0.0 255.252.0.0 s0/1/0
    This points to B3

    ReplyDelete
  10. the missing static routes in HQ:
    Para el espacio 192.168.0.0/27 Tenemos:

    ip route 192.168.0.128 255.255.255.224 fa0/0
    ip route 192.168.0.160 255.255.255.224 fa0/1

    Works!

    ReplyDelete