trainingit
29-10-2007, 06:40 PM
Hi, chào các bác,
Dynagen ngoài hỗ trợ cấu hình router bằng giao diện telnet còn cho phép cấu hình bằng web interface vì Dynagen có thể kết nối với Real Network.
vd về cấu hình router bằng web interface, giả lập bằng Dynamips/Dynagen
======= r3640.net ==============================
#cisco 3640 router
[localhost]
[[3640]]
image = C:\Program Files\Dynamips\images\c3640-jsx-mz.123-19.bin
ram = 64
[[Router R1]]
model = 3640
console = 2000
#ket noi voi card mang physical, card mang physical nhận Obtain IP address tu DHCP router
F0/0 = NIO_gen_eth:\Device\NPF_{7569963D-344A-4A1C-9947-EE1CDB0505E4}
================ end of .net file ===========================
Cấu hình router R1
R1
Router>ena
Router#conf t
Router(config)#hostname R1
R1(config)#interface F0/0
R1(config-if)#description Connect to physical network adapter
R1(config-if)#ip address 192.168.1.2 255.255.255.0
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#ip dhcp pool lanaddress
R1(dhcp-config)#default-router 192.168.1.1
R1(dhcp-config)#dns-server 192.168.1.2
R1(dhcp-config)#netbios-name-server 192.168.1.2
R1(dhcp-config)#network 192.168.1.0
R1(dhcp-config)#domain-name chungnt.dyndns.org
R1(dhcp-config)#exit
R1(config)#ip dhcp excluded-address 192.168.1.1 192.168.1.9
R1(config)#ip dhcp excluded-address 192.168.1.250 192.168.1.254
R1(config)#ip http server
R1(config)#ip http port 80
R1(config)#ip http authentication enable
R1(config)#ip access-list standard 20
R1(config-std-nacl)#permit 192.168.1.0 0.0.0.255
R1(config-std-nacl)#exit
R1(config)#ip http access-class 20
R1(config)#exit
R1#copy run start
Note : có 16 level để vào WEB UI cấu hình router, trong trường hợp này không cần cấu hình username, password để logon (trường hợp cần cấu hình router sẽ hiện cửa sổ prompt yêu cầu bạn nhập username, password. Khi đó bạn phải cấu hình username, password cho WEB UI logon)
Khi cấu hình xong, nếu tư PCs bạn có thể ping được F0/0 của R1
C:\>ping 192.168.1.2
Pinging 192.168.1.2 with 32 bytes of data:
Reply from 192.168.1.2: bytes=32 time=111ms TTL=255
Reply from 192.168.1.2: bytes=32 time=82ms TTL=255
Reply from 192.168.1.2: bytes=32 time=29ms TTL=255
Reply from 192.168.1.2: bytes=32 time=38ms TTL=255
thì bạn có thể vào giao diện web để cấu hình router với địa chỉ IP của F0/0 (giống như giao diện Web của router thật :D)
http://img88.imageshack.us/img88/9166/webui3660wn2.th.jpg (http://img88.imageshack.us/my.php?image=webui3660wn2.jpg)
Chúc các bạn vui vẻ !!!!!
:X:X:106::106:
Dynagen ngoài hỗ trợ cấu hình router bằng giao diện telnet còn cho phép cấu hình bằng web interface vì Dynagen có thể kết nối với Real Network.
vd về cấu hình router bằng web interface, giả lập bằng Dynamips/Dynagen
======= r3640.net ==============================
#cisco 3640 router
[localhost]
[[3640]]
image = C:\Program Files\Dynamips\images\c3640-jsx-mz.123-19.bin
ram = 64
[[Router R1]]
model = 3640
console = 2000
#ket noi voi card mang physical, card mang physical nhận Obtain IP address tu DHCP router
F0/0 = NIO_gen_eth:\Device\NPF_{7569963D-344A-4A1C-9947-EE1CDB0505E4}
================ end of .net file ===========================
Cấu hình router R1
R1
Router>ena
Router#conf t
Router(config)#hostname R1
R1(config)#interface F0/0
R1(config-if)#description Connect to physical network adapter
R1(config-if)#ip address 192.168.1.2 255.255.255.0
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#ip dhcp pool lanaddress
R1(dhcp-config)#default-router 192.168.1.1
R1(dhcp-config)#dns-server 192.168.1.2
R1(dhcp-config)#netbios-name-server 192.168.1.2
R1(dhcp-config)#network 192.168.1.0
R1(dhcp-config)#domain-name chungnt.dyndns.org
R1(dhcp-config)#exit
R1(config)#ip dhcp excluded-address 192.168.1.1 192.168.1.9
R1(config)#ip dhcp excluded-address 192.168.1.250 192.168.1.254
R1(config)#ip http server
R1(config)#ip http port 80
R1(config)#ip http authentication enable
R1(config)#ip access-list standard 20
R1(config-std-nacl)#permit 192.168.1.0 0.0.0.255
R1(config-std-nacl)#exit
R1(config)#ip http access-class 20
R1(config)#exit
R1#copy run start
Note : có 16 level để vào WEB UI cấu hình router, trong trường hợp này không cần cấu hình username, password để logon (trường hợp cần cấu hình router sẽ hiện cửa sổ prompt yêu cầu bạn nhập username, password. Khi đó bạn phải cấu hình username, password cho WEB UI logon)
Khi cấu hình xong, nếu tư PCs bạn có thể ping được F0/0 của R1
C:\>ping 192.168.1.2
Pinging 192.168.1.2 with 32 bytes of data:
Reply from 192.168.1.2: bytes=32 time=111ms TTL=255
Reply from 192.168.1.2: bytes=32 time=82ms TTL=255
Reply from 192.168.1.2: bytes=32 time=29ms TTL=255
Reply from 192.168.1.2: bytes=32 time=38ms TTL=255
thì bạn có thể vào giao diện web để cấu hình router với địa chỉ IP của F0/0 (giống như giao diện Web của router thật :D)
http://img88.imageshack.us/img88/9166/webui3660wn2.th.jpg (http://img88.imageshack.us/my.php?image=webui3660wn2.jpg)
Chúc các bạn vui vẻ !!!!!
:X:X:106::106: