با فرض سناریوی زیر چطور باید روت استاتیک بنویسم ؟
من اینجوری نوشتم جواب نداد (برای R1):( :[LEFT]
[CODE]ip route 192.168.1.0 255.255.255.0 192.168.0.0[/CODE]
[IMG]http://up.vatandownload.com/images/aglozgfr7knctalq2j6.png[/IMG]
[/LEFT]
Printable View
با فرض سناریوی زیر چطور باید روت استاتیک بنویسم ؟
من اینجوری نوشتم جواب نداد (برای R1):( :[LEFT]
[CODE]ip route 192.168.1.0 255.255.255.0 192.168.0.0[/CODE]
[IMG]http://up.vatandownload.com/images/aglozgfr7knctalq2j6.png[/IMG]
[/LEFT]
[QUOTE=Mahdi-t;369053]با فرض سناریوی زیر چطور باید روت استاتیک بنویسم ؟
من اینجوری نوشتم جواب نداد (برای R1):( :[LEFT]
[CODE]ip route 192.168.1.0 255.255.255.0 192.168.0.0[/CODE]
[IMG]http://up.vatandownload.com/images/aglozgfr7knctalq2j6.png[/IMG]
[/LEFT][/QUOTE]
فکر کنم به جای 192.168.0.0 باید آی پی اینترفیس سمت 192.168.1.0 رو بنویسی .
در R1 بنویس:
ip route 192.168.1.0 255.255.255.0 192.168.0.2
در R2 بنویس:
ip route 192.168.2.0 255.255.255.0 192.168.0.1
[COLOR="silver"]- - - Updated - - -[/COLOR]
default gateway را در end pointها ip اینترفیس همون دست روتر را بده تا بتونه packet را به روتر بده
[QUOTE=xp_black;369059]در R1 بنویس:
ip route 192.168.1.0 255.255.255.0 192.168.0.2
در R2 بنویس:
ip route 192.168.2.0 255.255.255.0 192.168.0.1
[COLOR=silver]- - - Updated - - -[/COLOR]
default gateway را در end pointها ip اینترفیس همون دست روتر را بده تا بتونه packet را به روتر بده[/QUOTE]
کار نکردش :(
[COLOR="silver"]- - - Updated - - -[/COLOR]
r1 خودش r2 رو میبینه ولی end point سمتش نه
برای end pointها هم باید بزنی دیگه مثل همون چیزی که گفتم
مثلا در R1 باید اینم اضافه کنی:
ip route 192.168.2.0 255.255.255.0 192.168.0.2
در R2 هم اینو اضافه کن:
ip route 192.168.1.0 255.255.255.0 192.168.0.1
من فکر کردم فقط نحوه نوشتن route رو مشکل داری والا همون اول برات کامل می نوشتم
دوباره تست کن
[COLOR="silver"]- - - Updated - - -[/COLOR]
در static routing باید تک تک network های دیگه شبکه را در هر روتر خودت دستی وارد کنی .
[COLOR="silver"]- - - Updated - - -[/COLOR]
پیشنهاد می کنم concept static routing را در ویرایش سوم کتاب ccna حتما مطالعه کنی
خیلی کمکت میکنه
جواب اولتون رو میدونستم اما اینو که تک تک شبکه ها رو باید وارد کرد نه
فکر می کردم فقط واسه ارتباط 2 روتر بنویسی کافیه
ممنون
[QUOTE][B]راهنمایی برای روت نوشتن[/B]
[/QUOTE]
[LEFT] In this tutorial we will connect two routers via static route with GNS3.
[B]Static route and Dynamic route[/B]
Static route tells the device exactly where to send traffic, no matter what. Static route is often used when your network has only a few routers or there is only one route from a source to a destination. Dynamic routes, on the other hand, use a routing protocol to determine the best path and the routes can be changed depending on specific parameters (like bandwidth, delay, cost…). With dynamic routes, routers can communicate with each other to exchange routing information. In ROUTE 642-902 you will learn about dynamic routing protocols such as OSPF, EIGRP and BGP (RIP is also a dynamic routing protocol but it is not mentioned in ROUTE).
The simple syntax of static route:
[B]ip route <destination><subnet mask><next hop IP address or outbound interface>
[/B]
Now we consider a real-world example of static routing. Suppose that your company has 2 branches located in New York and Chicago. As the administrator of the network, you are tasked to connect them so that employees in the two LANs can communicate with each other. After careful consideration you decided to connect them via static route.
[IMG]http://www.digitaltut.com/images/GNS3Labs/BasicLabs/Configure_Static_Route_topology.jpg[/IMG]
In GNS3, place 2 routers and connect them as the image below, I used IOS [B]c2600-bin-mz.123-6f.bin [/B]to save some RAM (only require 64MB/router). We will use two loopback interfaces to simulate two Ethernet LANs.
[IMG]http://www.digitaltut.com/images/GNS3Labs/BasicLabs/Configure_Static_Route_topology_gns3.jpg[/IMG][/LEFT]
[LEFT][B]Configuring interfaces on R0[/B]
R0(config)#interface s0/0
R0(config-if)#ip address 12.12.12.1 255.255.255.0
R0(config-if)#no shutdown
R0(config-if)#interface lo0
R0(config-if)#ip address 10.0.0.1 255.0.0.0
R0(config-if)#exit
[B]Configuring interfaces on R1[/B]
R0(config)#interface s0/0
R0(config-if)#ip address 12.12.12.2 255.255.255.0
R0(config-if)#no shutdown
R0(config-if)#interface lo0
R0(config-if)#ip address 172.16.0.1 255.255.0.0
R0(config-if)#exit
Now if we check the routing table of R0 & R1 by the command [B]show ip route[/B] on both R0 and R1
On R0:
R0# show ip route
[/LEFT]
[CENTER][IMG]http://www.digitaltut.com/images/GNS3Labs/BasicLabs/Configure_Static_Route_show_ip_routeR0.jpg[/IMG]
[/CENTER]
[LEFT]The letter “C” means “connected” or “directly connected”. So there are 2 networks that are directly connected to R0: 10.0.0.0/8 and 12.12.12.0
On R1
R1# show ip route[/LEFT]
[CENTER][IMG]http://www.digitaltut.com/images/GNS3Labs/BasicLabs/Configure_Static_Route_show_ip_routeR1.jpg[/IMG]
[/CENTER]
[LEFT][B]Configuring static route on R0[/B]
R0(config)#ip route 172.16.0.0 255.255.0.0 12.12.12.2
[B]Configuring static route on R1[/B]
R1(config)#ip route 10.0.0.0 255.0.0.0 12.12.12.1
Notice that static route works one-way. It means we have to add static route to both R0 and R1 so that R0 and R1 can communicate.[/LEFT]
[CENTER][IMG]http://www.digitaltut.com/images/GNS3Labs/BasicLabs/Configure_Static_Route_show_ip_routeR0_static.jpg[/IMG]
[/CENTER]
[LEFT]
[/LEFT]
[CENTER][IMG]http://www.digitaltut.com/images/GNS3Labs/BasicLabs/Configure_Static_Route_show_ip_routeR1_static.jpg[/IMG]
[/CENTER]
[LEFT]Now try to ping each far end network[/LEFT]
[CENTER][IMG]http://www.digitaltut.com/images/GNS3Labs/BasicLabs/Configure_Static_Route_ping.jpg[/IMG]
[/CENTER]
[LEFT](Note: In fact, R0 can successfully ping R1 right after adding the static route to R0)[/LEFT]
[LEFT][B]Administrative distance of a static route.
[/B][/LEFT]
[LEFT]After adding two static routes in R0 & R1 routers, the routing tables of two routers contain these lines:[/LEFT]
[LEFT]S 10.0.0.0/8 [1/0] via 12.12.12.1 (on R1)
S 172.16.0.0/16 [1/0] via 12.12.12.2 (on R0)[/LEFT]
[LEFT]The “S” letter tells us this is a static route. The networks 10.0.0.0/8 and 172.16.0.0/16 are the destinations of this static route and if the routers want to reach them they must send packets to 12.12.12.1 (on R1) and 12.12.12.2 (on R2). These parameters are straightforward and easy to understand. But what is [1/0]? Well, 1 is the [B]administrative distance[/B] (AD) and 0 is the [B]metric [/B]of that static route.[/LEFT]
[LEFT]The administrative distance is a measure of trustworthiness where lower numbers are considered to be more trustworthy than higher numbers. The route with the lowest administrative distance value is the preferred route that the router selects. Administrative distance is the value from 0 to 255.[/LEFT]
[LEFT]Directly connected routes have an administrative distance of 0. Static routes have an administrative distance
of 1 so in the outputs above you will see the administrative distance of both static routes are 1.
[/LEFT]
[LEFT]The router treats a static route pointing to an interface the same as a connected interface so the its AD is 0. If you configure a static route pointing to an exiting interface (for example: “ip route 172.16.0.0 255.255.0.0 [B]s0/0[/B]” on R0) then the AD will not be shown.
[/LEFT]
[LEFT](For your information, EIGRP has an administrative distance of 90. IGRP has an administrative distance of 100. OSPF has an administrative distance of 110. And RIP has an administrative distance of 120)
[URL="http://www.digitaltut.com/configure-static-route-gns3-lab"]Configure Static Route – GNS3 Lab[/URL]
[/LEFT]