Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Mar 2001 09:16:43 +0530 (IST)
From:      Satyajeet Seth <sseth@sasken.com>
To:        Julian Elischer <julian@elischer.org>
Cc:        <net@freebsd.org>, <gbnaidu@sasken.com>
Subject:   Re: Ping Problem
Message-ID:  <Pine.GSO.4.30.0103120818160.1273-100000@suns3.sasi.com>
In-Reply-To: <3AAC1D58.221D06F2@elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi

Please see my comments below.

> > I have configured pseudo ethernet interfaces with the following
> > requirements:
> > 1. There is a ethernet interface fxp0 having MAC address MAC0. It also
> > receives packets with destination MAC address MAC1 and MAC2.
> > 2. The packets with destination MAC address MAC1 are sent to pseudo
> > interface 1, nge0 and packets with destination MAC address MAC2 are sent
> > to pseudo interface 2, nge1.
> >
> > This has been done using netgraph as follows:
> > fxp0: <--> bpf <--> bpf <--> interface0
> >             \        \
> >              \        ------>interface1
> >               \
> >                \------------>interface2
> >
> > I have used ng_eiface nodes impemented by Vitaly
> > (available at http://www.riss-telecom.ru/~vitaly/) for  interface1/2. I
>
> What revision of FreeBSD? eiface is now in -current. (but not built by default)

> > have set fxp0 in promiscuous mode.
> >
> > Could you suggest why I am unable to ping the pseudo ethernet interface
> > IP addresses from any of the LAN machines?
> >
> > Is it because fxp0 is capable of sending packets only with its own MAC address and not MAC
> > addresses of nge0 and nge1?
>
> It's not impossible, but then bridging should fail to work too I would
> think. hmm maybe not..  Does another machine see any packets on the wire
> at all? If you insert a 'tee' between the bpf and the fxp do you see
> outgoing packets?

I am using FreeBSD 4.1. I followed Roger's suggestion about "autosrc 0"
message. But "autosrc" message is not available in ng_ether.
I have tried commenting
bcopy((IFP2AC(priv->ifp))->ac_enaddr, eh->ether_shost,
6);
in ng_ether_rcv_lower in ng_ether.c with the effect that fxp0 is able to
send packets with pseudo ethernet interface MAC address.

I have tried the following setup for pinging from nge0 to some machine on
LAN.

on pcs130 (Machine with pseudo ethernet interfaces, see output of
"ifconfig -a" below)
==============================
1. #route change -host 10.0.36.134 -ifp nge0
Now arp starts to print messages like:
arp: 'IP addr' is on fxp0 but got response from 'MAC address' on nge0.

2. #ping 10.0.36.134
This does not work.

on pcs134(some machine on lan)
==============================
Using tee's I found that 10.0.36.134 receives ethernet frames with src
MAC address of nge0 and dest MAC address of 10.0.36.134.
pcs134 response frames are sent to MAC address of default router
10.0.32.1. But pcs130 does not receive these frames.

Thanks
Satya


> > My ifconfig settings and routing table entries are given below.
> >
> > pcs130# ifconfig -a
> > fxp0: flags=8843<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
> >         inet 10.0.36.130 netmask 0xfffff000 broadcast 10.0.47.255
> >         inet6 fe80::2d0:b7ff:febd:711%fxp0 prefixlen 64 scopeid 0x1
> >         ether 00:d0:b7:bd:07:11
> >         media: autoselect (100baseTX <full-duplex>) status: active
> >         supported media: autoselect 100baseTX <full-duplex> 100baseTX 10baseT/UT
> > P <full-duplex> 10baseT/UTP
> > lp0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> mtu 1500
> > sl0: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 552
> > ppp0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
> > lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
> >         inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5
> >         inet6 ::1 prefixlen 128
> >         inet 127.0.0.1 netmask 0xff000000
> > gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
> > gif1: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
> > gif2: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
> > gif3: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
> > faith0: flags=8000<MULTICAST> mtu 1500
> > nge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
> >         inet 10.0.137.157 netmask 0xffffffff broadcast 10.0.137.157
> >         inet6 fe80::211:22ff:fe33:4455%nge0 prefixlen 64 scopeid 0xb
> >         ether 00:11:22:33:44:55
> > nge1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
> >         inet 10.0.198.158 netmask 0xffffffff broadcast 10.0.198.158
> >         inet6 fe80::2d0:b7ff:febd:711%nge1 prefixlen 64 scopeid 0xc
> >         ether 11:22:33:44:55:66
> > pcs130# netstat -rn
> > Routing tables
> > Internet:
> > Destination        Gateway            Flags      Netif Expire
> > default            10.0.32.1          UGSc        0        0     fxp0
> > 10.0.32/20         link#1             UC          0        0     fxp0 =>
> > 10.0.32.1          link#1             UHLW        1        0     fxp0 =>
> > 10.0.36.130        0:d0:b7:bd:7:11    UHLW        0       40      lo0
> > 10.0.137.157/32    link#11            UC          0        0     nge0 =>
> > 10.0.198.158/32    link#12            UC          0        0     nge1 =>
> > 127.0.0.1          127.0.0.1          UH          0        4      lo0
> > Internet6:
> > Destination                       Gateway                       Flags      Netif
> >  Expire
> > ::1                               ::1                           UH          lo0
> > fe80::%fxp0/64                    link#1                        UC         fxp0
> > fe80::%lo0/64                     fe80::1%lo0                   Uc          lo0
> > fe80::%nge0/64                    link#11                       UC         nge0
> > fe80::%nge1/64                    link#12                       UC         nge1
> > ff01::/32                         ::1                           U           lo0
> > ff02::%fxp0/32                    link#1                        UC         fxp0
> > ff02::%lo0/32                     fe80::1%lo0                   UC          lo0
> > ff02::%nge0/32                    link#11                       UC         nge0
> > ff02::%nge1/32                    link#12                       UC         nge1


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.30.0103120818160.1273-100000>