Minggu, 25 Desember 2011

Router RIP dan Nat dengan Packet Tracer


SETTING

Router0
Fa0/0 10.1.0.1/16
Ser2/0 10.2.0.1/16

Router1
Fa0/0 10.5.0.1/16
Ser2/0 10.2.0.2 DCE/16
Ser3/0 10.3.0.1 DCE/16

Router2
Fa0/0 10.4.0.1/16
Ser2/0 10.3.0.2/16

Subnet Mask 255.255.0.0

SETTING ROUTER0
Router>EN
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#in fa0/0
Router(config-if)#ip add 10.1.0.1 255.255.0.0
Router(config-if)#no shut

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#exit
Router(config)#in s2/0
Router(config-if)#ip add 10.2.0.1 255.255.0.0
Router(config-if)#no shut

%LINK-5-CHANGED: Interface Serial2/0, changed state to down
Router(config-if)#exit
Router(config)#rou rip
Router(config-router)#ver 2
Router(config-router)#network 10.1.0.0
Router(config-router)#network 10.2.0.0
Router(config-router)#exit
Router(config)#exit
%SYS-5-CONFIG_I: Configured from console by console
Router#sh ip protocol
Routing Protocol is "rip"
Sending updates every 30 seconds, next due in 9 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Redistributing: rip
Default version control: send version 2, receive 2
Interface Send Recv Triggered RIP Key-chain
FastEthernet0/0 2 2
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
10.0.0.0
Passive Interface(s):
Routing Information Sources:
Gateway Distance Last Update
Distance: (default is 120)
Router#sh 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
10.0.0.0/16 is subnetted, 1 subnets
C 10.1.0.0 is directly connected, FastEthernet0/0
Router#^Z
Router#wr mem
Building configuration...
[OK]
Router#

SETTING ROUTER1
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#
Router(config)#
Router(config)#int fa0/0
Router(config-if)#ip add 10.5.0.1 255.255.0.0
Router(config-if)#no shut

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#in s2/0
Router(config-if)#ip add 10.2.0.2 255.255.0.0
Router(config-if)#clock rate 64000
Router(config-if)#no shut

%LINK-5-CHANGED: Interface Serial2/0, changed state to up
Router(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/0, changed state to up
Router(config-if)#in s3/0
Router(config-if)#ip add 10.3.0.1 255.255.0.0
Router(config-if)#clock rate 64000
Router(config-if)#no shut

%LINK-5-CHANGED: Interface Serial3/0, changed state to down
Router(config-if)#exit
Router(config)#rou rip
Router(config-router)#ver 2
Router(config-router)#network 10.2.0.0
Router(config-router)#network 10.3.0.0
Router(config-router)#network 10.5.0.0
Router(config-router)#exit
Router(config)#exit
%SYS-5-CONFIG_I: Configured from console by console
Router#show ip protocol
Routing Protocol is "rip"
Sending updates every 30 seconds, next due in 2 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Redistributing: rip
Default version control: send version 2, receive 2
Interface Send Recv Triggered RIP Key-chain
FastEthernet0/0 2 2
Serial2/0 2 2
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
10.0.0.0
Passive Interface(s):
Routing Information Sources:
Gateway Distance Last Update
10.2.0.1 120 00:00:18
Distance: (default is 120)
Router#sh 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
10.0.0.0/16 is subnetted, 3 subnets
R 10.1.0.0 [120/1] via 10.2.0.1, 00:00:25, Serial2/0
C 10.2.0.0 is directly connected, Serial2/0
C 10.5.0.0 is directly connected, FastEthernet0/0
Router#^Z
Router#wr mem
Building configuration...
[OK]
Router#

SETTING ROUTER2
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#in fa0/0
Router(config-if)#ip add 10.4.0.1 255.255.0.0
Router(config-if)#no shut

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#exit
Router(config)#in s2/0
Router(config-if)#ip add 10.3.0.2 255.255.0.0
Router(config-if)#no shut

%LINK-5-CHANGED: Interface Serial2/0, changed state to up
Router(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/0, changed state to up
Router(config-if)#exit
Router(config)#rou rip
Router(config-router)#ver 2
Router(config-router)#network 10.3.0.0
Router(config-router)#network 10.4.0.0
Router(config-router)#exit
Router(config)#exit
%SYS-5-CONFIG_I: Configured from console by console
Router#show ip protocol
Routing Protocol is "rip"
Sending updates every 30 seconds, next due in 9 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Redistributing: rip
Default version control: send version 2, receive 2
Interface Send Recv Triggered RIP Key-chain
FastEthernet0/0 2 2
Serial2/0 2 2
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
10.0.0.0
Passive Interface(s):
Routing Information Sources:
Gateway Distance Last Update
10.3.0.1 120 00:00:04
Distance: (default is 120)
Router#sh 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
10.0.0.0/16 is subnetted, 5 subnets
R 10.1.0.0 [120/2] via 10.3.0.1, 00:00:19, Serial2/0
R 10.2.0.0 [120/1] via 10.3.0.1, 00:00:19, Serial2/0
C 10.3.0.0 is directly connected, Serial2/0
C 10.4.0.0 is directly connected, FastEthernet0/0
R 10.5.0.0 [120/1] via 10.3.0.1, 00:00:19, Serial2/0
Router#^Z
Router#wr mem
Building configuration...
[OK]
Router#


ip address pada masing - masing PC

ROUTER1

Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#in fa0/0
Router(config-if)#ip add 172.16.2.1 255.255.255.240
Router(config-if)#no shut

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#exit
Router(config)#in s2/0
Router(config-if)#ip add 10.10.10.1 255.0.0.0
Router(config-if)#clock rate 64000
Router(config-if)#no shut

%LINK-5-CHANGED: Interface Serial2/0, changed state to down
Router(config-if)#exit
Router(config)#in s3/0
Router(config-if)#ip add 20.20.20.1 255.0.0.0
Router(config-if)#clock rate 64000
Router(config-if)#no shut

%LINK-5-CHANGED: Interface Serial3/0, changed state to down
Router(config-if)#exit
Router(config)#in s6/0
Router(config-if)#ip add 30.30.30.1 255.0.0.0
Router(config-if)#clock rate 64000
Router(config-if)#no shut

%LINK-5-CHANGED: Interface Serial6/0, changed state to down
Router(config-if)#exit
Router(config)#rou RIP
Router(config-router)#network 10.10.10.0
Router(config-router)#network 20.20.20.0
Router(config-router)#network 30.30.30.0
Router(config-router)#network 172.16.0.0
Router(config-router)#^Z
%SYS-5-CONFIG_I: Configured from console by console
Router#wr mem
Building configuration...
[OK]
Router#
Router#
Router#
Router#sh run
Building configuration...

Current configuration : 736 bytes
!
version 12.2
no service password-encryption
!
hostname Router
!
!
!
!
!
ip ssh version 1
!
!
interface FastEthernet0/0
ip address 172.16.2.1 255.255.0.0
duplex auto
speed auto
!
interface FastEthernet1/0
no ip address
duplex auto
speed auto
shutdown
!
interface Serial2/0
ip address 10.10.10.1 255.0.0.0
clock rate 64000
!
interface Serial3/0
ip address 20.20.20.1 255.0.0.0
clock rate 64000
!
interface FastEthernet4/0
no ip address
shutdown
!
interface FastEthernet5/0
no ip address
shutdown
!
interface Serial6/0
ip address 30.30.30.1 255.0.0.0
clock rate 64000
!
router rip
network 10.0.0.0
network 20.0.0.0
network 30.0.0.0
network 172.16.0.0
!
ip classless
!
!
!
!
!
line con 0
line vty 0 4
login
!
!
end

ROUTER2

Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#in fa0/0
Router(config-if)#ip add 200.200.200.1 255.255.255.0
Router(config-if)#no shut

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#in s2/0
Router(config-if)#ip add 20.20.20.2 255.0.0.0
Router(config-if)#no shut

%LINK-5-CHANGED: Interface Serial2/0, changed state to up
Router(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/0, changed state to up
Router(config-if)#
Router(config-if)#exit
Router(config)#rou rip
Router(config-router)#network 20.0.0.0
Router(config-router)#network 200.200.200.0
Router(config-router)#no shut
^
% Invalid input detected at '^' marker.

Router(config-router)#exit
Router(config)#^Z
%SYS-5-CONFIG_I: Configured from console by console
Router#wr mem
Building configuration...
[OK]
Router#
Router#sh run
Building configuration...

Current configuration : 591 bytes
!
version 12.2
no service password-encryption
!
hostname Router
!
!
!
!
!
ip ssh version 1
!
!
interface FastEthernet0/0
ip address 200.200.200.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1/0
no ip address
duplex auto
speed auto
shutdown
!
interface Serial2/0
ip address 20.20.20.2 255.0.0.0
!
interface Serial3/0
no ip address
shutdown
!
interface FastEthernet4/0
no ip address
shutdown
!
interface FastEthernet5/0
no ip address
shutdown
!
router rip
network 20.0.0.0
network 200.200.200.0
!
ip classless
!
!
!
!
!
line con 0
line vty 0 4
login
!
!
end


ROUTER0 NAT

(Kenapa Router 0 kita Set terakhir, karena di Router ini kita menggunakan NAT,inside/outset, dimana kita bisa melakukan jalur masuk ke server/DNS akan tetapi dari DNS/Server tidak bisa masuk ke dalam jaringan kita....
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#in fa0/0
Router(config-if)#ip add 192.168.1.1 255.255.255.0
Router(config-if)#no shut

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#exit
Router(config)#in s2/0
Router(config-if)#ip add 10.10.10.2 255.0.0.0
Router(config-if)#no shut

%LINK-5-CHANGED: Interface Serial2/0, changed state to up
Router(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/0, changed state to up
Router(config-if)#exit
Router(config)#ip route 0.0.0.0 0.0.0.0 s2/0
Router(config)#int fa0/0
Router(config-if)#in nat inside
^
% Invalid input detected at '^' marker.


Router(config-if)#exit
Router(config)#in s2/0
Router(config-if)#ip nat outside
Router(config-if)#exit
Router(config)#ip nat inside source static 192.168.1.2 10.10.10.3
Router(config)#no shut
Router(config)#exit
%SYS-5-CONFIG_I: Configured from console by console
Router#^Z
Router#wr mem
Building configuration...
[OK]
Router#