Re: Multihomed box

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 14 Jan 2004, Bill Gradwohl wrote:

> Assume a box with 2 NIC's connected to 2 networks - 10.0.0.0/24 and
> 192.168.168.0/24.
> 
> What determines the source IP address of a packet sent from this box to
> either of its attached networks? Is it eth0?
> 
> How can I influence the source address of a packet destined for either
> network to show its source to be from that network? i.e. All packets
> originating on this box going to the 192.168.168.0 network show it coming
> from that network, and all packets destined for the 10.0.0.0 network show it
> coming from that network? 
> 
> The reason I ask is because I always assumed the packet would have a source
> address closest to the destination. I discovered however that this is not
> the case.
> 
    I'm no expert on routing, but as I understand it, if the packet
originates from your box, and is not just being forwarded by it, your
firewall shouldn't set the source IP address.  Instead the source address
is set to be the IP address of the NIC through which it is being sent.  
The choice of what NIC to use for a given destination is made by your
routing table, and in simple cases the routing table is determined by
/etc/sysconfig/network and /etc/sysconfig/network-scripts/ifcfg-eth*.
Assuming you aren't doing anything complicated, what you are likely to
want to know about your routing table can be seen with the command
"route" and what you want to know about your NICs can be seen with
the command "ifconfig".

-- 
Steven Yellin


-- 
Shrike-list mailing list
Shrike-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/shrike-list

[Index of Archives]     [Fedora Users]     [Centos Users]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat Phoebe Beta]     [Yosemite Forum]     [Fedora Discussion]     [Gimp]     [Stuff]     [Yosemite News]

  Powered by Linux