Page 1 of 3 123 LastLast
Results 1 to 10 of 28

Thread: Khảo sát một số vấn đề về default-route trong routing

  1. Default Default information orriginated

    3 lệnh :

    IP default-network x.x.x.x
    IP route 0.0.0.0 0.0.0.0 x.x.x.x
    IP default-gateway x.x.x.x

    Lệnh nào khi dùng kèm với lệnh Default-information orriginated trogn 1 routing protocol sẽ inject cái default-route vào trong routing update?
    -------------------------------------------------------
    Yamaha R6 Rider
    Tôi là Yuna_admirer.

  2. #2
    rip Guest

    Default Re: Default information orriginated

    IP route 0.0.0.0 0.0.0.0 x.x.x.x

  3. #3
    Join Date
    May 2003
    Location
    Đà Nẵng
    Posts
    119

    Default

    Bạn có thể dùng default information originate always . Lệnh này không cần dùng kèm với ip route 0.0.0.0 0.0.0.0 x.x.x.x .

    Chúc vui !

  4. #4
    Join Date
    May 2003
    Location
    Ho Chi Minh city
    Posts
    771

    Default Re: Default information orriginated

    Quote Originally Posted by TGA_Certificationteam
    3 lệnh :

    IP default-network x.x.x.x
    IP route 0.0.0.0 0.0.0.0 x.x.x.x
    IP default-gateway x.x.x.x

    Lệnh nào khi dùng kèm với lệnh Default-information orriginated trogn 1 routing protocol sẽ inject cái default-route vào trong routing update?
    TGA,

    Lệnh IP default-gateway chỉ dùng khi quá trình routing bị DISABLE.
    Cả hai lệnh còn lại, ip default-network và ip route 0.0.0.0 0.0.0.0 xxxx đều sẽ lan truyền default-route về các down-stream router.
    Cách mà các routing protocol lan truyền default-route rất khác nhau.


    chúc TGA thành công,
    -----------------------------------
    ip default-gateway

    The ip default-gateway command differs from the other two commands in that it should only be used when ip routing is disabled on the Cisco router.

    For instance, if the router is a host in the IP world, you can use this command to define a default gateway for it. You might also use this command when your low end Cisco router is in boot mode in order to TFTP a Cisco IOS® Software image to the router. In boot mode, the router does not have ip routing enabled.

    ip default-network

    Unlike the ip default-gateway command, you can use ip default-network when ip routing is enabled on the Cisco router. When you configure ip default-network the router considers routes to that network for installation as the gateway of last resort on the router.

    For every network configured with ip default-network, if a router has a route to that network, that route is flagged as a candidate default route. Look at the following routing table taken from a Cisco router:

    2513#show 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
    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, * - candidate default
    Gateway of last resort is not set
    161.44.0.0 255.255.255.0 is subnetted, 1 subnets
    C 161.44.192.0 is directly connected, Ethernet0
    S 198.10.1.0 [1/0] via 161.44.192.2
    131.108.0.0 255.255.255.0 is subnetted, 1 subnets
    C 131.108.99.0 is directly connected, TokenRing0

    Note the static route to 198.10.1.0 via 161.44.192.2 and that the gateway of last resort is not set. If you configure ip default-network 198.10.1.0, the routing table changes to the following:

    2513#show 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
    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, * - candidate default

    Gateway of last resort is 161.44.192.2 to network 198.10.1.0

    161.44.0.0 255.255.255.0 is subnetted, 1 subnets
    C 161.44.192.0 is directly connected, Ethernet0
    S 161.44.0.0 255.255.0.0 [1/0] via 161.44.192.0
    S* 198.10.1.0 [1/0] via 161.44.192.2
    131.108.0.0 255.255.255.0 is subnetted, 1 subnets
    C 131.108.99.0 is directly connected, TokenRing0
    2513#show ip protocols
    2513#

    You can see the gateway of last resort has now been set as 161.44.192.2. This result is independent of any routing protocol, as shown by the show ip protocols command at the bottom of the output.

    You can add another candidate default route simply by configuring another instance of ip default-network:

    2513#config terminal
    Enter configuration commands, one per line. End with CNTL/Z.
    2513(config)#ip route 171.70.24.0 255.255.255.0 131.108.99.2
    2513(config)#ip default-network 171.70.24.0
    2513(config)#^Z

    2513#show 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
    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, * - candidate default

    Gateway of last resort is 161.44.192.2 to network 198.10.1.0

    161.44.0.0 255.255.255.0 is subnetted, 1 subnets
    C 161.44.192.0 is directly connected, Ethernet0
    S 161.44.0.0 255.255.0.0 [1/0] via 161.44.192.0
    S* 198.10.1.0 [1/0] via 161.44.192.2
    171.70.0.0 is variably subnetted, 2 subnets, 2 masks
    S 171.70.0.0 255.255.0.0 [1/0] via 171.70.24.0
    S 171.70.24.0 255.255.255.0 [1/0] via 131.108.99.2
    131.108.0.0 255.255.255.0 is subnetted, 1 subnets
    C 131.108.99.0 is directly connected, TokenRing0

    Notice that after entering the above command, the network was not flagged as a default network. The following section explains why.

    Flagging a Default Network

    Note: The ip default-network command is classful, which means if the router has a route to the subnet indicated by this command, it installs the route to the major net. At this point neither network has been flagged as the default network. The ip default-network command must be issued again, using the major net, in order to flag the candidate default route.

    2513#config terminal
    Enter configuration commands, one per line. End with CNTL/Z.
    2513(config)#ip default-network 171.70.0.0
    2513(config)#^Z

    2513#show 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
    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, * - candidate default

    Gateway of last resort is 161.44.192.2 to network 198.10.1.0

    161.44.0.0 255.255.255.0 is subnetted, 1 subnets
    C 161.44.192.0 is directly connected, Ethernet0
    S 161.44.0.0 255.255.0.0 [1/0] via 161.44.192.0
    S* 198.10.1.0 [1/0] via 161.44.192.2
    171.70.0.0 is variably subnetted, 2 subnets, 2 masks
    S* 171.70.0.0 255.255.0.0 [1/0] via 171.70.24.0
    S 171.70.24.0 255.255.255.0 [1/0] via 131.108.99.2
    131.108.0.0 255.255.255.0 is subnetted, 1 subnets
    C 131.108.99.0 is directly connected, TokenRing0
    If the original static route had been to the major network, the extra step of configuring the default network twice would not have been necessary.

    There are still no IP protocols running here. Without any dynamic protocols running, you can configure your router to choose from a number of candidate default routes based on whether the routing table has routes to networks other than 0.0.0.0/0. This command allows you to configure robustness into the selection of a gateway of last resort. Rather than configuring static routes to specific next-hops, you can have the router choose a default route to a particular network by checking in the routing table.

    If you lose the route to a particular network, the router selects the second candidate default, as specified above. You can remove the lost route by removing the static route in the configuration as follows:

    2513#config terminal
    Enter configuration commands, one per line. End with CNTL/Z.
    2513(config)#no ip route 198.10.1.0 255.255.255.0 161.44.192.2
    2513(config)#^Z
    2513#
    %SYS-5-CONFIG_I: Configured from console by console
    After removing the static route to the original default network, the routing table looks like this:

    2513#show 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
    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, * - candidate default

    Gateway of last resort is 171.70.24.0 to network 171.70.0.0

    161.44.0.0 255.255.255.0 is subnetted, 1 subnets
    C 161.44.192.0 is directly connected, Ethernet0
    S 161.44.0.0 255.255.0.0 [1/0] via 161.44.192.0
    * 171.70.0.0 is variably subnetted, 2 subnets, 2 masks
    S* 171.70.0.0 255.255.0.0 [1/0] via 171.70.24.0
    S 171.70.24.0 255.255.255.0 [1/0] via 131.108.99.2
    131.108.0.0 255.255.255.0 is subnetted, 1 subnets
    C 131.108.99.0 is directly connected, TokenRing0
    2513#

    Using Different Routing Protocols

    Gateways of last resort selected using the ip default-network command are propagated differently depending on which routing protocol is propagating the default route. For IGRP and EIGRP to propagate the route, the network specified by the ip default-network command must be known to IGRP or EIGRP. This means the network must be an IGRP- or EIGRP-derived network in the routing table, or the static route used to generate the route to the network must be redistributed into IGRP or EIGRP.

    RIP advertises a route to 0.0.0.0. For example, note that the gateway of last resort on the router below was learned using the combination of the ip route and ip default-network commands. If you enable RIP on this router, RIP advertises a route to 0.0.0.0 (although not to the Token Ring network because of split-horizon):

    2513(config)#router rip
    2513(config-router)#network 161.44.0.0
    2513(config-router)#network 131.108.0.0
    2513(config-router)#^Z
    2513#
    2513#
    2513#
    %SYS-5-CONFIG_I: Configured from console by console
    2513#debug ip rip
    RIP protocol debugging is on
    2513#
    RIP: sending update to 255.255.255.255 via Ethernet0 (161.44.192.1)
    default 0.0.0.0, metric 1
    network 131.108.0.0, metric 1
    RIP: sending update to 255.255.255.255 via TokenRing0 (131.108.99.1)
    network 161.44.0.0, metric 1
    2513#

    Note: In IOS release 12.0T and later, RIP does not advertise the default router if the route is not learned via RIP. Therefore, it may be necessary to redistribute the route into RIP, or use the default-information originate command.

    OSPF, like RIP, advertises a route for 0.0.0.0 0.0.0.0. However, with OSPF, the router originating the default route must be configured with the default-information originate command. For more detailed information, see How Does OSPF Generate Default Routes?.

    ip route 0.0.0.0 0.0.0.0

    Creating a static route to network 0.0.0.0 0.0.0.0 is another way to set the gateway of last resort on a router. As with the ip default-network command, using the static route to 0.0.0.0 is not dependent on any routing protocols. However, ip routing must be enabled on the router.

    Note: IGRP does not understand a route to 0.0.0.0, therefore it cannot propagate default routes created using the ip route 0.0.0.0 0.0.0.0 command. Use the ip default-network command to have IGRP propagate a default route.

    EIGRP propagates a route to network 0.0.0.0, but the static route must be redistributed into EIGRP. RIP and OSPF behave as described when using the ip default-network command. Keep in mind that the note above still applies.

    Look at an example of configuring a gateway of last resort using the ip route 0.0.0.0 0.0.0.0 command:

    router-3#conf terminal
    Enter configuration commands, one per line. End with CNTL/Z.
    router-3(config)#ip route 0.0.0.0 0.0.0.0 170.170.3.4
    router-3(config)#^Z
    router-3#

    router-3#show 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, * - candidate default
    U - per-user static route, o - ODR

    Gateway of last resort is 170.170.3.4 to network 0.0.0.0

    170.170.0.0/24 is subnetted, 2 subnets
    C 170.170.2.0 is directly connected, Serial0
    C 170.170.3.0 is directly connected, Ethernet0
    S* 0.0.0.0/0 [1/0] via 170.170.3.4
    router-3#
    router-3#
    Note: If you configure multiple networks as candidate default routes using the ip default-network command, the network that has the lowest administrative distance is chosen as the network for the gateway of last resort. If all the networks have the same administrative distance then the network listed first in the routing table (show ip route lists the routing table) is chosen as the network for the gateway of last resort. If you use both the ip default-network and ip route 0.0.0.0 0.0.0.0 commands to configure candidate default networks, and the network used by the ip default-network command is known statically, the network defined with the ip default-network command takes precedence and is chosen for the gateway of last resort. Otherwise if the network used by the ip default-network command is derived by a routing protocol, the ip route 0.0.0.0 0.0.0.0 command, which will have a lower administrative distance, takes precedence and is chosen for the gateway of last resort. Lastly, if you use multiple ip route 0.0.0.0 0.0.0.0 commands to configure a default route, traffic is load-balanced over the multiple routes.

    Summary

    To summarize, you can use the ip default-gateway command when ip routing is disabled on a Cisco router. Use the ip default-network and ip route 0.0.0.0 0.0.0.0 commands to set the gateway of last resort on Cisco routers that have ip routing enabled. The way in which routing protocols propagate the default route information varies for each protocol.

  5. #5
    R3 Guest

    Default Đặt Gateway of Last Resort bằng các lệnh IP

    Bài viết này hướng dẫn cách dùng các câu lệnh: ip default−gateway, ip default−network , and ip route 0.0.0.0 0.0.0.0 để cấu hình default route, hay gateway of last resort.

    ip default−gateway
    Lệnh ip default−gateway chỉ dùng khi disable ip routing trên router Cisco. Nếu một router trong mạng, có thể dùng lệnh này để định nghĩa ngõ ra mặc định cho nó. Cũng có thể dùng lệnh này để TFTP một image cho router khi ở boot mode.


    ip default−network
    Không như lệnh ip default-gateway , có thể dùng lệnh ip default-network khi ip routing đã enable trên router. Khi thực hiện lệnh này, router xem như route tới mạng đó đặt là ngõ ra cuối cùng (gateway of last resort) trên router.
    Đối với mỗi mạng đã cấu hình ip default-network, nếu một router có route cho mạng đó, thì route đó được đánh dấu là candidate default. Xem bảng định tuyến trên router Cisco sau:

    Code:
    2513#show 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
           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, * - candidate default
    Gateway of last resort is not set
         161.44.0.0 255.255.255.0 is subnetted, 1 subnets
    C       161.44.192.0 is directly connected, Ethernet0
    S    198.10.1.0 [1/0] via 161.44.192.2
         131.108.0.0 255.255.255.0 is subnetted, 1 subnets
    C       131.108.99.0 is directly connected, TokenRing0
    Nếu cấu hình ip default-network 198.10.1.0 trên router thì bảng định tuyến thay đổi như sau:

    Code:
    2513#show ip route
    ...
    Gateway of last resort is 161.44.192.2 to network 198.10.1.0
     
         161.44.0.0 255.255.255.0 is subnetted, 1 subnets
    C       161.44.192.0 is directly connected, Ethernet0
    S       161.44.0.0 255.255.0.0 [1/0] via 161.44.192.0 
    S*    198.10.1.0 [1/0] via 161.44.192.2
         131.108.0.0 255.255.255.0 is subnetted, 1 subnets
    C       131.108.99.0 is directly connected, TokenRing0
    2513#show ip protocols
    2513#
    Như vậy có thể thấy gateway of last resort đựơc đặt là 161.44.192.2. Kết quả này không phụ thuộc bất kỳ giao thức định tuyến nào.

    Có thể thêm một route candidate default đơn giản bằng cách cấu hình ip default-network khác.

    Code:
    2513#config terminal
    Enter configuration commands, one per line.  End with CNTL/Z.
    2513(config)#ip route 171.70.24.0 255.255.255.0 131.108.99.2
    2513(config)#ip default-network 171.70.24.0
    2513(config)#^Z
    
    2513#show ip route
    ...
     
    Gateway of last resort is 161.44.192.2 to network 198.10.1.0
     
         161.44.0.0 255.255.255.0 is subnetted, 1 subnets
    C    161.44.192.0 is directly connected, Ethernet0
    S    161.44.0.0 255.255.0.0 [1/0] via 161.44.192.0 
    S*   198.10.1.0 [1/0] via 161.44.192.2
         171.70.0.0 is variably subnetted, 2 subnets, 2 masks
    S    171.70.0.0 255.255.0.0 [1/0] via 171.70.24.0
    S    171.70.24.0 255.255.255.0 [1/0] via 131.108.99.2
         131.108.0.0 255.255.255.0 is subnetted, 1 subnets
    C    131.108.99.0 is directly connected, TokenRing0
    Chú ý, sau khi thực hiện lệnh trên, mạng không được đánh dấu là default network. Phần sau đây sẽ giải thích tại sao.


    Đánh dấu một default network
    Chú ý: Lệnh ip default-network là classfull, nghĩa là nếu router có một route tới mạng con chỉ bởi lệnh này, nó đặt route về major net. Lúc này không mạng nào mạng được đánh dấu là default network. Lệnh ip default-network phải đựơc đặt lại dùng major net, để đánh dấu route là candidate default.

    Code:
    2513#config terminal
    Enter configuration commands, one per line. End with CNTL/Z. 
    2513(config)#ip default-network 171.70.0.0
    2513(config)#^Z
    
    2513#show 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
           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, * - candidate default
     
    Gateway of last resort is 161.44.192.2 to network 198.10.1.0
     
            161.44.0.0 255.255.255.0 is subnetted, 1 subnets
    C       161.44.192.0 is directly connected, Ethernet0
    S       161.44.0.0 255.255.0.0 [1/0] via 161.44.192.0 
    S*      198.10.1.0 [1/0] via 161.44.192.2
            171.70.0.0 is variably subnetted, 2 subnets, 2 masks
    S*      171.70.0.0 255.255.0.0 [1/0] via 171.70.24.0
    S       171.70.24.0 255.255.255.0 [1/0] via 131.108.99.2
            131.108.0.0 255.255.255.0 is subnetted, 1 subnets
    C       131.108.99.0 is directly connected, TokenRing0
    Ở đây vẫn chưa chạy giao thức IP. Không có chạy giao thức định tuyến động, có thể cấu hình router chọn từ một số route candidate default dựa trên bảng định tuyến. Lệnh này cho phép cấu hình thẳng vào phần gateway of last resort. Hơn là cấu hình static roue tới chặng kế nào đó, có thể router chọn default route tới mạng nào đó bằng cách kiểm tra bảng định tuyến.

    Nếu route tới mạng bị mất, router chọn candidate default thứ hai. Có thể lọai bỏ route hỏng bằng cách loại static route như cấu hình dưới đây:

    Code:
    2513#config terminal
    Enter configuration commands, one per line.  End with CNTL/Z.
    2513(config)#no ip route 198.10.1.0 255.255.255.0 161.44.192.2
    2513(config)#^Z
    2513#
    %SYS-5-CONFIG_I: Configured from console by console
    
    
    2513#show 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
           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, * - candidate default
     
    Gateway of last resort is 171.70.24.0 to network 171.70.0.0
     
         161.44.0.0 255.255.255.0 is subnetted, 1 subnets
    C       161.44.192.0 is directly connected, Ethernet0
    S       161.44.0.0 255.255.0.0 [1/0] via 161.44.192.0 
    *   171.70.0.0 is variably subnetted, 2 subnets, 2 masks
    S*      171.70.0.0 255.255.0.0 [1/0] via 171.70.24.0
    S       171.70.24.0 255.255.255.0 [1/0] via 131.108.99.2
         131.108.0.0 255.255.255.0 is subnetted, 1 subnets
    C       131.108.99.0 is directly connected, TokenRing0
    2513#
    Dùng các giao thức định tuyến khác

    Gateways of last resort được chọn bằng lệnh ip default-network truyền đi khác nhau phụ thuộc vào giao thức định tuyến nào sẽ lan truyền default route. Với IGRP va EIGRP để lan truyền route, mạng xác định bởi lệnh ip default-network phải biết bởi IGRP hay EIGRP. Có nghĩa là mạng phải một mạng học được từ IGRP hay EIGRP trong bảng định tuyến, hay static route dùng để tạo route phải được redistribute vào IGRP hay EIGRP.

    RIP quảng cáo route 0.0.0.0. Ví dụ, giả sử gateway of last resort trên router học được thông qua lệnh ip route và ip default-network, nếu chạy RIP trên router này, RIP sẽ quảng cáo route thành 0.0.0.0

    Code:
    2513(config)#router rip
    2513(config-router)#network 161.44.0.0
    2513(config-router)#network 131.108.0.0
    2513(config-router)#^Z
    2513#
    2513#
    2513#
    %SYS-5-CONFIG_I: Configured from console by console
    2513#debug ip rip
    RIP protocol debugging is on
    2513#
    RIP: sending update to 255.255.255.255 via Ethernet0 (161.44.192.1)
         default 0.0.0.0, metric 1
         network 131.108.0.0, metric 1
    RIP: sending update to 255.255.255.255 via TokenRing0 (131.108.99.1)
    network 161.44.0.0, metric 1
    2513#
    Trong IOS release 12.0T và later, RIP không quảng cáo default route nếu route đó không được học từ RIP. Do đó, cần phải redistribute route này vào RIP, hay sử dụng lệnh default-information originate .

    OSPF, giống như RIP, quảng cáo route cho 0.0.0.0 0.0.0.0. Tuy nhiên, với OSPF, router là nguồn của default route phải được cấu hình bằng lệnh default-information originate


    ip route 0.0.0.0 0.0.0.0

    Tạo static route tới mạng 0.0.0.0 0.0.0.0 là một cách khác để đặt gateway of last resort trên một router. Như đối với lệnh ip default-network, sử dụng static route tới 0.0.0.0 không phụ thuộc vào giao thức định tuyến. Tuy nhiên, ip routing phải được enable trên router.

    Chú ý: IGRP không hiểu route tới 0.0.0.0, do đó nó không thể truyền các default route tạo bằng lệnh ip route 0.0.0.0 0.0.0.0 . Dùng lệnh ip default-network để được IGRP truyền default route.

    EIGRP lan truyền thông tin route tới mạng 0.0.0.0, nhưng static route phải được redistribute vào EIGRP. RIP và OSPF cư xử như đã mô tả khi dùng lệnh ip default-network.

    Xem ví dụ sau, cấu hình gateway of last resort dùng lệnh ip route 0.0.0.0 0.0.0.0

    Code:
    router-3#conf terminal
       Enter configuration commands, one per line. End with CNTL/Z.
       router-3(config)#ip route 0.0.0.0 0.0.0.0 170.170.3.4
       router-3(config)#^Z
       router-3#
       
       router-3#show 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, * - candidate default
       U - per-user static route, o - ODR
    
    Gateway of last resort is 170.170.3.4 to network 0.0.0.0
    
     170.170.0.0/24 is subnetted, 2 subnets
       C 170.170.2.0 is directly connected, Serial0
       C 170.170.3.0 is directly connected, Ethernet0
       S* 0.0.0.0/0 [1/0] via 170.170.3.4
       router-3#
       router-3#

    Chú ý:
    - Nếu cấu hình nhiều mạng là candidate default route sử dụng lệnh ip default-network, mạng có AD nhỏ nhất sẽ được chọn là mạng cho gateway of last resort.
    - Nếu tất cả các mạng có cùng AD thì mạng được liệt kê đầu tiên trong bảng định tuyến sẽ đựơc chọn là mạng cho gateway of last resort.
    - Nếu dùng cả hai lệnh ip default-network và ip route 0.0.0.0 để cấu hình candidate default network, và mạng dùng bởi ip default-network biết bằng static route, mạng định nghĩa bằng lệnh ip default-network sẽ được xem xét trước và đựơc chọn cho gateway of last resort. Ngược lại nếu mạng dùng bởi ip default-network biềt được bằng giao thức định tuyến, lệnh ip route 0.0.0.0 0.0.0.0 , có AD nhỏ hơn, sẽ được ưu tiên và được chọn là gateway of last resort.
    - Cuối cùng, nếu dùng nhiều lệnh ip route 0.0.0.0 0.0.0.0 để cấu hình default route, dữ liệu sẽ được load-balance trên các route.


    Tóm lại
    - Sử dụng ip default-gateway khi vô hiệu hoá ip routing trên router Cisco.
    - Dùng lệnh ip default-network và ip route 0.0.0.0 0.0.0.0 để đặt gateway of last resort trên các router Cisco có enable ip routing.
    - Các thức các giao thức định tuyến truyền thông tin default route khác nhau đối với mỗi giao thức.



    ---------------------
    Trích dịch từ CCO:
    http://www.cisco.com/en/US/tech/tk36...80094374.shtml

  6. #6

    Default

    Hi all,
    Mình có một problem liên quan đến vấn đề này. Mình thử cấu hình trên router 2514 câu lệnh ip default-network 192.168.1.0. Bảng định tuyến như sau:

    Gateway of last resort is not set

    C* 192.168.1.0 is directly connected, Serial 0

    Với kết quả này, mình không thể sử dụng 192.168.1.0/24 làm tuyến mặc định được. Nếu dùng ip route 0.0.0.0 0.0.0.0 192.168.1.2 thì hoạt động tốt. Mình còn thiếu điều gì chăng?

    Mong được giúp đỡ.

  7. #7

    Default

    hi netdevice,

    ip default-network chỉ apply cho IGRP/EIGRP. Với RIP, nó có thể phụ thuộc vào IOS version.

    netdevice dùng routing protocol gì?

    Thân,
    Đặng Quang Minh, CCIE#11897 CCSI#31417

    Email : dangquangminh@vnpro.org

    -----------------------------------------------------------------------------------------------
    Trung Tâm Tin Học VnPro
    149/1D Ung Văn Khiêm P25 Q.Bình thạnh TPHCM
    Tel : (08) 35124257 (5 lines)
    Fax: (08) 35124314

    Home page: http://www.vnpro.vn
    Support Forum: http://www.vnpro.org
    - Chuyên đào tạo quản trị mạng và hạ tầng Internet
    - Phát hành sách chuyên môn
    - Tư vấn và tuyển dụng nhân sự IT
    - Tư vấn thiết kế và hỗ trợ kỹ thuật hệ thống mạng

    Network channel: http://www.dancisco.com
    Blog: http://www.vnpro.org/blog

  8. #8

    Default

    hi anh Minh,
    Em thử cả 2 IGRP và RIP đều không được. Nhưng em nghĩ giao thức định tuyến đâu có liên quan đến điều này vì em muốn tạo một tuyến mặc định bằng ip default-network để có thể ping interface loopback của 1 router kết nối trực tiếp. Router 2514 có IOS 12.1.
    Thanks.

  9. #9

    Default Re: Đặt Gateway of Last Resort bằng các lệnh IP

    netdevice,

    Xem file đính kèm. Chú ý đến từng chi tiết.

    Cấu hình này đã được test nhiều lần và working.

    Thân,
    Viet Professionals Co. Ltd. VnPro ®
    ---------------------------------------
    149/1D Ung Văn Khiêm P25 Q.Bình thạnh TPHCM
    Tel: (08) 35124257 (7 lines)
    Fax: (08) 5124314
    Support forum: http://vnpro.org
    LiveChat : http://www.vnpro.vn/support
    Blog VnPro : http://vnpro.org/blog
    Forum Wifi : http://wifipro.org

  10. #10
    themask Guest

    Default

    hi,

    Bạn thử cấu hình như sau xem thử có chạy được không.

    ip route 192.168.1.0 255.255.255.0 192.168.1.2
    ip default-network 192.168.1.0

Page 1 of 3 123 LastLast

Similar Threads

  1. Một cái nhìn về thi cử ở nước ta !
    By ccnphanoi in forum Góc Thư Giãn
    Replies: 2
    Last Post: 08-01-2011, 08:45 PM
  2. Config ISA for ISA newbies. - Suu tam
    By nadmad in forum Microsoft
    Replies: 8
    Last Post: 27-06-2010, 11:53 PM
  3. Tips for CCIE Candidate
    By binhhd in forum CCIE Routing & Switching
    Replies: 10
    Last Post: 22-04-2009, 02:01 PM
  4. Làm sao nghe được tiếng Anh
    By Mr.Metal in forum Góc Thư Giãn
    Replies: 14
    Last Post: 28-03-2009, 01:36 PM
  5. Routing between RIPv1 & RIPv2
    By themask in forum ROUTE / BSCI
    Replies: 5
    Last Post: 10-03-2004, 02:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
 
   TRUNG TÂM TIN HỌC VNPRO
149/1D Ung Văn Khiêm, P. 25, Q.Bình Thạnh
Phone:(08) 35124257
Fax: (08) 35124314
Email: vnpro@vnpro.org
Powered by vBulletin Version 4.2.1
Copyright 2000 - 2011, Jelsoft Enterprises Ltd.
License owned by : VietProfessional Co.,Ltd
 

Ve may bay |Ve may bay gia re |Ve may bay di Ha Noi |Ve may bay di Nha Trang |Ve may bay di Da Nang |Ve may bay di Da Lat |Ve may bay di Vinh |Ve may bay di Hue |Ve may bay di Con Dao |Ve may bay di TP HCM |Air Asia |Tiger Airways |Vietnam Airlines |Lion Air |Aeroflot |Jetstar |Vietjet Air |Asiana |Delta Airlines |Singapore Airlines |Thai Airways |quantas |Turkish Airlines |China Southern Airlines |Air China |Ve may bay gia re |Ve may bay di Anh |Ve may bay di Canada |Ve may bay di Ha Lan |Ve may bay di Han Quoc |Ve may bay di Hong Kong |Ve may bay di Y |Ve may bay di Italia |Ve may bay di Malaysia |Ve may bay di Nga |Ve may bay di Phap |Ve may bay di Philippines |Ve may bay di Singapore |Ve may bay di Thai Lan |Ve may bay di Trung Quoc |Ve may bay di Uc |Ve may bay di Ukraina |Ve may bay di Duc |Ve may bay di My |Ve may bay di My