GNS3 – router, mint host

Hogyan állítsunk be egy routert hostnak GNS3-ban?

Adott a topológia, R2 host-ként fog viselkedni:

R1 config:

Connected to Dynamips VM "R1" (ID 0, type c3725) - Console port
Press ENTER to get the prompt.
R1>
R1>
R1>en
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#int lo1
*Mar 1 00:01:24.383: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback1, changed state to up
R1(config-if)#ip add 1.1.1.1 255.255.255.255
R1(config-if)#int lo7
R1(config-if)#ip add
*Mar 1 00:01:33.243: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback7, changed state to up
R1(config-if)#ip add 7.7.7.7 255.255.255.255
R1(config-if)#int f0/0
R1(config-if)#ip add 10.0.12.1 255.255.255.0
R1(config-if)#duplex full
R1(config-if)#speed auto
R1(config-if)#no sh
R1(config-if)#
*Mar 1 00:01:59.379: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar 1 00:02:00.379: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R1(config-if)#^Z
R1#
*Mar 1 00:02:05.639: %SYS-5-CONFIG_I: Configured from console by console
R1#

R2 configja:

R2>
R2>en
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#int f0/0
R2(config-if)#ip add 10.0.12.2 255.255.255.0
R2(config-if)#duplex full
R2(config-if)#speed auto
R2(config-if)#no sh
R2(config-if)#^Z
R2#
*Mar 1 00:02:24.447: %SYS-5-CONFIG_I: Configured from console by console
R2#
*Mar 1 00:02:25.823: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar 1 00:02:26.823: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

Pingeljük a szomszédot, működik:

R2#ping 10.0.12.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.12.1, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 28/30/32 ms

Pingeljük R1 Lo7-t, nem működik:

R2#ping 7.7.7.7
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 7.7.7.7, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)

Csináljunk R2-ből hostot: adjunk egy default-gateway-t, és kapcsoljuk ki az ip routing-ot:

R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#no ip routing
R2(config)#ip default-gateway 10.0.12.1
R2(config)#^Z

Teszteljük ismét:

R2#ping 7.7.7.7
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 7.7.7.7, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/236/1044 ms
R2#

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.