cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
653
Views
5
Helpful
9
Replies

Routing intrested traffic to diffrent Interface.

sagittarius
Level 1
Level 1

Hi ,

I have two Serial Interface, both have internet connection.

I want to route only http traffic from my ethernet interface to Serial Interface 1/1, but rest all traffic should go to Serial interface 1/0.

I have a default route 0.0.0.0 0.0.0.0 Serial 1/0.

How can i do this ?

9 Replies 9

abahl
Level 1
Level 1

you can do this by segrigating http traffic from all other ip traffic using Extended Access Lists.

Once u have http traffic separated, use separate route map statements to set s1/1 as the next hop for the http traffic and set s1/0 as next hop for all other traffic

Regards,

Anuj Bahl

Hi ,

I tried this but when i shutdown the Serial Interface s1/0 , i am unable to browse internet because of default route 0.0.0.0 0.0.0.0 serial 1/0.

Hi,

Can you paste your configs ? Isnt the default route going off when you shut down the serial interface s1/0 ??

Sankar Nair
UC Solutions Architect
Pacific Northwest | CDW
CCIE Collaboration #17135 Emeritus

What happens if you add a second default route, e.g:

ip route 0.0.0.0 0.0.0.0 serial 0/0 2

(the metric or distance should be higher than that of s1/0)?

If i add second default route it will solve the problem only if i shutdown my Serial port .....but i want only http traffic to flow through serial 0/0.

It is only for testing i used to shutdown my serial port & check http traffic.

Router configuration.....

!

interface FastEthernet0/0

ip address 200.134.26.233 255.255.255.240

no ip redirects

no ip unreachables

no ip mroute-cache

duplex auto

speed auto

no cdp enable

!

interface Serial1/0

bandwidth 512

backup interface Dialer0

ip address 200.134.29.246 255.255.255.252

ip access-group 101 in

no ip redirects

no ip unreachables

no ip mroute-cache

no fair-queue

!

interface Serial1/1

ip address 211.129.239.78 255.255.255.240

no ip redirects

no ip unreachables

no ip mroute-cache

no fair-queue

!

ip classless

ip route 0.0.0.0 0.0.0.0 Serial1/0

ip route 0.0.0.0 0.0.0.0 Dialer0

ip route 10.0.0.0 255.0.0.0 Null0

ip route 192.168.0.0 255.255.0.0 Null0

no ip http server

!

As I have mentioned earlier, you can use the route maps to do this in the following manner:

access-list 100 permit tcp any any eq 80

route-map permit 10

match ip address 100 (acl no.)

set ip next hop (ip address of the egress serial interface for http traffic)

Ip route 0.0.0.0 0.0.0.0 (next hop is the interface ip from which all the traffic except http will go out)

Cordially,

Anuj

Yes i have used route-map & access-list same as u have metioned above.

but if i debug

debug ip policy 100

it shows me no packets transfer through that interface.

did u check out my router configuration. ?

actually i have 2 ISP which provide internet service.Ethernet & serial ip address is give by one ISP & other serial ip address is give by other ISP.Will this make a diffrence.

Greetings!

I forgot to mention one command in the ethernet interface config, add following command in the ethernet interface config:

ip policy route-map

Are all the three interfaces (both serial and an ethernet) up up?

Route map config will only work if all the interfaces are up.

The difference in IP address subnets due to different ISPs should not affect the route-map configs.

Before debugging you can verify the config via these show commands:

1. show access-lists 100

2. show route-map

In the output of first command you will see the no. of packets matched as per ACL criteria i.e. http packets.

In the output of the second command you will see the no. of packets matching the routing policy as per route-map i.e. intresting traffic defined as per acl 100.

In case you are not able see matches for show commands then you can use debug ip policy , but main reason in this case would be improper configuration.

Cordially,

Anuj

worapojr
Level 1
Level 1

Hi,

I think that you can try with Policy-Based routing to define ip any any port 80 to route to s1/1 and define cost of s1/0 better than s1/1, then only http will be routed through s1/1 and rest of all will route to s1/0

Hope it will solve.

Worapoj R.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: