Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computing > Cisco > Source IP address

Reply
Thread Tools

Source IP address

 
 
Igor Mamuzic
Guest
Posts: n/a
 
      12-09-2008
When my router A routes locally generated icmp packets (local PBR) it always
puts ip address of it's interface fa1 as the source address for those PBR
routed packets. Traffic is policy routed trough tunnel interface 0 using
next hop of router's B tunnel interface 0. This is what I want to accomplish
and it works, but I noticed that router A always generates packets with
source IP address of its fa1 interface. Now, I'm curious why is that so...

Router A:
int fa1
ip add 10.0.0.2
!
int vlan 2
description GRE tunnel source
ip add 10.0.0.10
crypto-map vpn
!
int tunnel 0
description GRE with router B
ip add 172.168.1.1
tunnel-source vlan 2
tunnel-destination 10.0.0.14
!
ip route 0.0.0.0 0.0.0.0 fa1
ip local policy route-map tracker
!
route-map tracker permit
match ip add 171
set ip next-hop 172.168.1.2 - this is IP of tunnel interface on router B
!
access-list 171 permit icmp any host 195.29.150.3 echo

Router B config is irrelevant because debug ip policy on router A shows that
there is always fa1 ip address used as the source for locally generated
traffic. Now if I want to be able to ping 195.29.150.3 from router A I need
to put static route to router's A fa1 interface address on router B which is
something that I would like to avoid.

Regards,
Igor

 
Reply With Quote
 
 
 
 
Thrill5
Guest
Posts: n/a
 
      12-10-2008
The router will use as the source ip address, the interface that the router
will use to send the packet. I don't know how PBR affects this. This is
true for any packets or TCP connections initiated by the router. For some
connections, you can specify the source IP (TACACs, SNMP, NTP, etc), for
others you can't (TFTP, telnet)

You can specify the source IP used by pings. Enter "ping" without any
arguments and answer the prompts. When it asks "Extended commads [n]" enter
"y". The next prompt will be for the source address. You can specify an
interface name or an interface ip address.


"Igor Mamuzic" <> wrote in message
news:ghlg1h$13f$...
> When my router A routes locally generated icmp packets (local PBR) it
> always puts ip address of it's interface fa1 as the source address for
> those PBR routed packets. Traffic is policy routed trough tunnel interface
> 0 using next hop of router's B tunnel interface 0. This is what I want to
> accomplish and it works, but I noticed that router A always generates
> packets with source IP address of its fa1 interface. Now, I'm curious why
> is that so...
>
> Router A:
> int fa1
> ip add 10.0.0.2
> !
> int vlan 2
> description GRE tunnel source
> ip add 10.0.0.10
> crypto-map vpn
> !
> int tunnel 0
> description GRE with router B
> ip add 172.168.1.1
> tunnel-source vlan 2
> tunnel-destination 10.0.0.14
> !
> ip route 0.0.0.0 0.0.0.0 fa1
> ip local policy route-map tracker
> !
> route-map tracker permit
> match ip add 171
> set ip next-hop 172.168.1.2 - this is IP of tunnel interface on router B
> !
> access-list 171 permit icmp any host 195.29.150.3 echo
>
> Router B config is irrelevant because debug ip policy on router A shows
> that there is always fa1 ip address used as the source for locally
> generated traffic. Now if I want to be able to ping 195.29.150.3 from
> router A I need to put static route to router's A fa1 interface address on
> router B which is something that I would like to avoid.
>
> Regards,
> Igor
>



 
Reply With Quote
 
 
 
 
Igor Mamuzic aka Pseto
Guest
Posts: n/a
 
      12-11-2008
ok I discovered that it always uses IP address of the interface with default
route as source IP address for locally generated packets Until now I
thought that router will always use IP address of egress interface as a
source ip until configured to not do so. Is there any logical explanation
about this?

Igor



 
Reply With Quote
 
Dan Lanciani
Guest
Posts: n/a
 
      12-11-2008
In article <ghr9eu$p9g$>, (Igor Mamuzic aka Pseto) writes:

| ok I discovered that it always uses IP address of the interface with default
| route as source IP address for locally generated packets Until now I
| thought that router will always use IP address of egress interface as a
| source ip until configured to not do so. Is there any logical explanation
| about this?

I believe the router typically uses as a source address the primary address
of the interface that would hypothetically be the egress interface under
normal routing rules. It does not "pre run" any other code (e.g., route
maps) that could result in a different egress interface. Even in some
simple cases you can get undesirable effects. For example, if the interface
is chosen because of the route installed for a secondary address the router
still uses the primary address as source. In many cases where it matters
at all this is not the address you want...

Dan Lanciani
ddl@danlan.*com
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i edit source (like in IE, view..source)? q_q_anonymous@yahoo.co.uk Firefox 4 05-13-2006 11:07 PM
Adding a web application project to source control (Visual Source Safe) ~~~ .NET Ed ~~~ ASP .Net 1 02-26-2005 02:20 PM
Source control and versions of third party source Marcus Leon Java 5 02-03-2005 03:37 PM
Data Recovery SOURCE CODE ( SOURCE CODES of Professional Data Recovery Software ) Author Tarun Tyagi Cisco 0 12-29-2004 05:03 PM
is there a way to "include" source file B.html in source file A.html? Cloud Burst HTML 11 01-09-2004 02:49 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57