How to determine the interface?


 
Thread Tools Search this Thread
Special Forums IP Networking How to determine the interface?
# 1  
Old 11-02-2004
How to determine the interface?

Given the interfaces on a firewall:

eth0 Link encap:Ethernet HWaddr 02:40:67:34:F5:47
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0

eth1 Link encap:Ethernet HWaddr 86:23:98:45:35:56
inet addr:123.45.240.69 Bcast:255.255.255.255 Mask:255.255.252.0

eth2 Link encap:Ethernet HWaddr 86:23:98:45:35:56
inet addr:123.45.240.70 Bcast:255.255.255.255 Mask:255.255.252.0

eth3 Link encap:Ethernet HWaddr 12:73:00:c4:47:56
inet addr:192.168.1.1 P-t-P:192.168.1.2 Mask:255.255.255.255

and the routing table:
Destination Gateway Genmask Iface
192.168.1.2 0.0.0.0 255.255.255.255 eth3
192.168.0.0 0.0.0.0 255.255.255.0 eth0
123.45.240.0 0.0.0.0 255.255.0.0 eth1
123.45.240.0 0.0.0.0 255.255.254.0 eth2
131.244.0.0 0.0.0.0 255.254.0.0 eth3
0.0.0.0 203.45.240.1 0.0.0.0 eth1



If I want to determine the interface which following packets:

SRC ADDR DST ADDR
192.168.0.3 123.45.241.30
240.18.10.3 131.244.12.23
10.4.5.6 10.4.5.7


what is the interface for these three pairs? and the most important thing is how to recognize it?
# 2  
Old 11-04-2004
Did you try route or netstat -r ?
# 3  
Old 11-04-2004
Oh, I see you did Smilie

You could traceroute to the IP address and find the interface of your machine that way ....

BTW, the first one seems to be eth0 ....
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

Determine PCI Endpoint for a Serial Interface.

Hi Folks, Here is one for the real Solaris aficionados on the site; I have a T5240 and have to create an I/O domain with access to the serial port, in this case /dev/term/a and although I have been through the documentation I'm having some issues in identifying the device to assign. What I... (2 Replies)
Discussion started by: gull04
2 Replies

2. Shell Programming and Scripting

Bash- Determine what interface is online

Hey guys, I want to use a a quick bash script/command to determine what network interface is connected to the internet so I can pipe it out to become a variable, in order so the user does not have to manually type it in each time or have to 'hardcode' the variable into the script. I know about... (6 Replies)
Discussion started by: 3therk1ll
6 Replies

3. UNIX for Dummies Questions & Answers

Adding a network interface to a bonded interface

I have a RHEL 5 system with a bonded interface configure using only one network port (eth0). So I have config file for ifcfg-bond0 and ifcfg-eth. I'd like to configure eth5 to be the second SLAVE in the bond. My question is, after I modify ifcfg-eth5, can I add eth5 to the bond0 interface without... (1 Reply)
Discussion started by: westmoreland
1 Replies

4. IP Networking

Need a bridge from an ethernet interface to a serial interface

This is my situation DOS pc serial cable (sl0) Linux Pc eth1 192.168.0.10 <-------------------->192.168.0.2 <------------>192.168.0.1 (router) I connected the linux pc and the dos pc with a SLIP (serial line internet protocol), so they can communicate in the sl0 interface. ... (3 Replies)
Discussion started by: mghis
3 Replies

5. SCO

Change SCO - GUI or Desktop interface to DOS based interface

Hi all I have installed a demo version of SCO OpenServer 5.0.2, I finally found it is Desktop Interface, I would like to know how to change its interface to dos based interface? If you have any ideas, please tell me then. Thank you (2 Replies)
Discussion started by: TinhNhi
2 Replies

6. Solaris

Command line Interface or GUI Interface not shown on solaris

Dear all, I am a newbie in solaris and I need your advice. I have a Solaris version 5.9 installed on Sunfire V240. I am able to ssh the machine from putty remotely. My problem is that I cannot see the display from KVM switch I have connected to it. I need also to be able to see the GUI... (2 Replies)
Discussion started by: mbouster
2 Replies

7. HP-UX

How to determine network interface that will be used to send a packet for an IP

Hello, I'm writing to you because I encountered the following problem. My program displayes all network interfaces that are available in the system, but I would like to add a functionality in which a user can enter a destination address IP (ex. the IP address of the Google search engine) and will... (1 Reply)
Discussion started by: foxrafi
1 Replies

8. Solaris

Determine Solaris box network interface?

Given a new Solaris box, with a fresh, unconfigured install on it, how does one figure out what kind of network interface it has (bge,le, hme, etc)? (8 Replies)
Discussion started by: akbar
8 Replies

9. Programming

determine if a ethernet interface is up

Howto check if a ethernet interface is up? It's impossible to determine via the ipaddress i have learned, or? Can someone please give me a hint on howto do? Environment == Linux x86 GNU GCC. :D regards Esaia (2 Replies)
Discussion started by: Esaia
2 Replies
Login or Register to Ask a Question