SETTING THE ROUTER

calvesnorthNetworking and Communications

Oct 24, 2013 (3 years and 8 months ago)

97 views

SETTING THE
ROUTER

Router>

Router> enable

Router# config t


YOU ARE SETTING THE HOSTNAME

Router(config)# hostname Kevin


YOU ARE SETTING THE ENABLE SECRET PASSWORD

Kevin(config)# line console 0

Kevin(config
-
line)#
password cisco

Kevin(config
-
line)# login

Kevin(config
-
line)#exit


YOU ARE SETTING THE TELNET PASSWORD

Kevin(config)# line vty 0 4

Kevin(config
-
line)# password cisco

Kevin(config
-
line)# login

Kevin(config
-
line)# exit


YOUR ARE SETTING PRIVLIDGE PASSWORD (
Enable)

Kevin(config)#
enable password CISCO



YOU ARE SETTING THE BANNER MESSAGE OF THE DAY

Kevin(config)# banner motd # This is my Router ! ! ! Leave it alone


YOU ARE SETTING THE FAST EITHERNET INTERFACE

Kevin(config)# interface fa 0/0

Kevin(config
)# description this is the backbone for kevin on 192.168.1.0

Kevin(config)# ip addess 192.168.1.1 255.255.255.224

Kevin(config)# no shutdown

Kevin(config)# exit


YOU ARE SETTING THE SERIAN INTERFACES So/o/o
-
DCE, So/o/1
-
DTE

Kevin(config)# interface so/o/o

Kevin(config
-
if)# description this is connected to Network B on 192.168.100.32 via DCE

Kevin(config
-
if)# ip addess 192.168.100.33 255.255.255.252

Kevin(config
-
if)# bandwidth 512
----

NOT NEEDED
---

Kevin(config
-
if)# clock rate
X
XXX (IE 400000)

Kevin(config
-
if)#encapsulation ppp


----

NOT NEEDED
---

Kevin(config
-
if)# no shutdown

Kevin(config
-
if)# exit

Kevin(config)# interface so/o/1

Kevin(config
-
if)# description this is connected to Network C on 192.168.100.36 via
DTE

Kevin(config
-
if)# ip addess 192.168.100.38 255.255.255.252

Kevin(config
-
if)# bandwidth 512

Kevin(config
-
if)#encapsulation ppp


Kevin(config
-
if)# no shutdown

Kevin(config
-
if)# exit

YOU ARE SETTING THE ROUTER PROTOCOL: OSPF A
ND AVDERTISING YOUR
ROUTER’S NETWORK

Kevin(config)# router ospf
1

Kevin(config
-
router)# network 192.168.1.0 255.255.255.224 area 0

Kevin(config
-
router)# network 192.168.32.0 255.255.255.252 area 0

Kevin(config
-
router)# network 192.168.36.0 255.255.255.252
area 0

Kevin(config
-
router)# exit

Kevin(config)# exit


YOU ARE SETTING THE ROUTER PROTOCOL:
RIP

AND AVDERTISING YOUR
ROUTER’S NETWORK

Kevin(config)#
router rip

Kevin(config)#
network 192.168.1.0

Kevin(config
-
router)# exit

Kevin(config)# exit


YOU ARE SETTI
NG THE
ROUTER NOT TO LOOKUP COMMANDS

Kevin(config)# no ip domain lookup


COPING

THE
ROUTER CONFIGURATION FILES AND IMPLEMENTING THEM

Kevin# show run

Kevin# copy run start



NAT Translation

Kevin# conf t

Kevin(config)#ip route 0.0.0.0 0.0.0.0 s2/0
-
0’s =

any IP address forward it to s2/0 (or the desired port)
-


Kevin(config)#
ip nat inside source static 10.0.0.254 200.10.0.2

Kevin(config)#int s2/0

Kevin(config
-
if)#ip nat outside

Kevin(config
-
if)#int fa0/0

Kevin(config
-
if)#ip nat inside











** Setting

up a Frame
-
Relay (Place at

least 2 routers conntected by the Frame
-
relay cloud)

Connect the Routers to the cloud via a Serial DCE cable

Router #1


Router>

Router> enable

Router# config t


YOU ARE SETTING THE HOSTNAME

Router1(config)# hostname Kevin


Router1(config)#i nt s2/0 (serial s2/0)

Router1(config
-
i f)#cl ock rate 64000

Router1(config
-
i f)#i p add X.X.X.X S.S.S.S (X= IP address, S=Subnet)

Router1(config
-
i f)#no sh

Router1(config
-
i f)#router rip

Router1(config
-
i f)#net X.X.X.X (Do this
for every network
, ie 200.0.0.0; 192.168.1.0
)


Router #2


Router>

Router> enable

Router# config t


YOU ARE SETTING THE HOSTNAME

Router2(config)# hostname Kevin


Router2(config)#i nt s2/0 (serial s2/0)

Router2(config
-
i f)#cl ock rate 64000

Router2(confi
g
-
i f)#i p add X.X.X.X S.S.S.S (X= IP address, S=Subnet)

Router2(config
-
i f)#no sh

Router2(config
-
i f)#router rip

Router2(config
-
i f)#net X.X.X.X (Do this for every network)


CLOUD CONFIGURATION

Click on the Cloud

Click on the Config TAB

Click on the S
erialX (Which ever serial that is connected, ie Serial1)

Type the following:

DLCI:

102
NAME:

R1
-
R2
Then Click Add

Click on the SerialX (Which ever serial that is connected, ie Serial2)

DLCI:

201
NAME:

R2
-
R1
Then Click Add


CLICK ON FRAME RELAY

Choose SerialX (port) and then R1
-
R2 (Sublink) <
-
> Choose SerialX (port) and then R2
-
R1 (Sublink)
Then click Add


On Router1:

Router1(config
-
i f)#i nt s2/0

Router1(config
-
i f)#encapsulation frame
-
relay

Router1(config
-
i f)#no shut



On Router2:

Router2(config
-
i f)#i nt s2/0

Router2(config
-
i f)#encapsulation frame
-
relay

Router2(config
-
i f)#no shut

YOU A
RE SETTING THE ROUTER FOR VoIP:




*
**Connect
all the cables Make sure
th
at

the
cable from the switch
to the IP phone

is connected to the Switch
port on the phone

****

Switch>en

Switch#conf t

Switch(config)#interface range fa0/1


5

Switch(config
-
if
-
range)#switchport mode access

Switch(config
-
if
-
range)#switchport voice vlan 1

*** W
e need to configure our router to provide
IP

address to
IP

phones and set the calling numbers for
phones , we will use CME call manager express
embedded

with router IOS
itself
.

***

Router>en

Router#conf t


Router(config)#hostname UCME

<
--

Changes the Routers Name

UCME
(config)#int fa 0/0

UCME
(config
-
if)#ip add 192.168.10.1 255.255.255.0

UCME
(config
-
if)#no sh

UCME
(config
-
if)#exit

UCME
(config)#ip dhcp pool voicelab

UCME
(dhcp
-
config)#network 192.168.10.0
255.255.255.0

UCME
(dhcp
-
config)#default
-
router 192.168.10.1

UCME
(dhcp
-
config)#
option

150

ip 192.168.10.1

<
--

Used by the phone for Firmware updates

UCME
(dhcp
-
config)#exit

UCME
(config)#telephony
-
service

UCME(
config
-
telephony)#max
-
dn 5





<
-

max numbers on directory

UCME
(config
-
telephony)#max
-
ephones 5



<
--

max number of phones

UCME
(config
-
telephony)#ip source
-
address 192.168.10.1 port 2000


< gateway can be used by
phones


UCME
(config
-
telephony)#auto assign 4 to 6



UCME
(config
-
telephony)#auto assign 1 to 5


UCME
(config)#ephone
-
dn 1


<
---

phone number 1

Routerconfig
-
ephone
-
dn)#number 54001


<
---

phone calling number

UCME(
config
-
ephone
-
dn)#
exit

UCME
(config)#ephone
-
dn 2



UCME
(config
-
ephone
-
dn)#number 54002

UCME
(config
-
ephone
-
dn)#exit

UCME
(config)#ephone
-
dn 3

UCME
(config
-
ephone
-
dn)#number 11111

UCME
(config
-
ephone
-
dn)#exit



***Connect the
power cable

to the IP phone ****



*
*

Hover the mouse over the IP Phones and see if you have received an IP address and a telephone number
*
*





*
*

Now place a call from one phone to another. Just click on the handset and dial a number to the other
ohone
*
*



*
*

You can connect a PC to each phone via the PC port on the IP Phone. MAKE sure you either assign an IP
Address to the PC or use DHCP
*
*




*
*

Connecting 2 Call Managers
*
*

Router1(config)#dial
-
peer voice 1 voip

<
--

Assigning the dial
-
peer

Router1(config)#destination
-
pattern 2
<
--

Prefix of the other CME

Router1(config)#
session target ipv4:192.168.2.1
<
--

IP Address of the other CME

Router1
(config)# ip route 10.0.0.0 255.0.0.0 150.72.21.2

<
--

Creates the route


Router2(config)#dial
-
peer voice 1 voip


<
--

Assigning the dial
-
peer

Router2(config)#destination
-
pattern 1
<
--

Prefix of the other CME

Router2(config)#session target ipv4:192.168.1.1
<
--

IP Address of the other CME

Router2
(config)# ip route 10.0.0.0 255.0.0.0 150.72.21.2

<
--

Creates the route


Subnetting:


Bits

Subnet
(1)

Host
(0)

1

2

0

2

4

2

3

8

6

4

16

14

5

32

30

6

64

62

7

128

126

8

256

254

9

512

510

10

1024

1020

11

2048

2046

12

4096

4094

13

8192

8190

14

16384

16382

15

32768

32764

16

65536

65534


How to use this chart:


Subnets are "1's" and are read left to right and Host are "0's" and are read right to left.



Determine how many networks you need or how many host (IP devices) you are required to
have


So let's look at host first:


Scenario #1


You will be using IP address 157.5.254.173 You need to subnet your
network

so that there
will be 28 host on each network.


So now look at the chart and find the closest number under the host column which is 30.
Now fro
m 30 go left in the cha
r
t to the BITS

column

and it corresponds to 5


Now let's get the subnet for it.


Since we only need 5 Host bits

(0’s [right to left])
our subnet will look like this


11111111.11111111.11111111.11100000





225

.



255


.



255

.


224



How I got the 224 is take the "1
’s
"
in the last octet
and add them up.

128

64

32

16

8

4

2

1

1

1

1

0

0

0

0

0


128 + 64 + 32 = 224

For the CIDR notation all you do is count all of the "1"

11111111.11111111.11111111.11100000


8 + 8 + 8 + 3


8 + 8 + 8 + 3 = 27


The custom sub
-
net mask

is:

{decimal/CIDR} 255.255.255.224 /27


Now we can sort out the IP address for each network


The 1st IP address is 157.5.0.0 now just look at your chart and look at the Host number
again, which was 30, and now take the number from the
Subnet

and just add it to the IP
address So the next range of IP addresses starts with 157.5.0.32


Subnet
Network

Address

First
Useable IP
Address

Last
Useable IP
Address

Broadcast
Address

Subnet
Number

157.5.0.0

157.5.0.1

157.5.0.30

157.5.0.31

0

157.5.0.32

157.5.0.33

157.5.0.62

157.5.0.63

1

157.5.0.64

157.5.0.65

157.5.0.94

157.5.0.95

2

157.5.0.96

157.5.0.97

157.5.0.126

157.5.0.127

3

157.5.0.128

157.5.0.129

157.5.0.158

157.5.0.159

4

157.5.0.160

157.5.0.161

157.5.0.190

157.5.0.191

5

157.5.0.192

157.5.0.193

157.5.0.222

157.5.0.223

6

157.5.0.224

157.5.0.225

157.5.0.254

157.5.0.255

7

157.5.1.0

157.5.1.2

157.5.1.30

157.5.1.31

8

157.5.1.32

157.5.1.33

157.5.1.
62

157.5.1.63

9


. . . E T C . . .


So if you now take the IP address in the first statement you will be

able figure out which
range that it belongs to; which is the 157.5.0.0

/27 network.