> From: David Van Arnem
> Sent: Friday, April 01, 2016 11:53 PM

> On 04/01/2016 06:48 AM, Bhupesh Sharma wrote:
> > Hello,
> >
> > Any suggestions for this issue? Is this a known issue?
> >
> 
> Hi Bhupesh,
> 
> The ping command allows you to specify the interface you would like to
> use with the -s flag, e.g.
> 
> ping -s eth0 192.168.1.1
> 
> or
> 
> ping -s eth1 192.168.1.1
> 
> The options for ping can be displayed in the Shell with "help ping".

Hi David,

Many thanks. It looks like ping -s is not a valid syntax. It may be that I am 
using a older ShellPkg:

FS0:\> ping -s eth1 192.168.1.1
ping: Invalid argument - '-s'

Looking at the help, I figured out that I need to use -_s option instead:

FS0:\> help ping
Pings the target host with an IPv4 or IPv6 stack.

PING [-_ip6] [-_s SourceIp] [-n count] [-l size] TargetIp ...
EXAMPLES:
...
  * To ping the target host by specifying the source adapter as IPv4 address:
    fs0:\> ping -_s 202.120.100.12 202.120.100.1
---
This is a successful test:

FS0:\> ping -_s 192.168.1.8 192.168.1.1
InstallProtocolInterface: 41D94CD2-35B6-455A-8258-D4E51334AADD 836E623BE0 Ping 
192.168.1.1 16 data bytes.
16 bytes from 192.168.1.1 : icmp_seq=1 ttl=0 time=1ms
16 bytes from 192.168.1.1 : icmp_seq=2 ttl=0 time=2ms
16 bytes from 192.168.1.1 : icmp_seq=3 ttl=0 time=2ms
16 bytes from 192.168.1.1 : icmp_seq=4 ttl=0 time=2ms
16 bytes from 192.168.1.1 : icmp_seq=5 ttl=0 time=2ms
16 bytes from 192.168.1.1 : icmp_seq=6 ttl=0 time=2ms
16 bytes from 192.168.1.1 : icmp_seq=7 ttl=0 time=1ms

Now, this leaves me wondering why the Shell Specifications 2.1 contain an old 
syntax for the PING command?
        Ping [-n count] [-l size] TargetIp

Will someone care to update it to reflect the correct options, in an upcoming 
Shell specification version?

Regards,
Bhupesh

> >
> >> -----Original Message-----
> >> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf
> >> Of Bhupesh Sharma
> >> Sent: Thursday, March 31, 2016 5:18 PM
> >> To: edk2-devel@lists.01.org
> >> Subject: [edk2] Using multiple SNP drivers on Shell
> >>
> >> Hi EDK2 experts,
> >>
> >> We are facing an issue when we enable two SNP (Simple Network)
> >> drivers in our EDK2 setup over a ARMv8 based SoC - NXP LS2080A.
> >>
> >> Here, I have two Ethernet interfaces - one is a MAC on SoC + Phy chip
> >> interface, while the other is a E1000 NIC card connected over a PCIe
> >> slot.
> >>
> >> A) When I run the 'ifconfig -l' command, I am able to see that both
> >> the Ethernet interfaces can be probed and they get listed as eth0 and
> >> eth1
> >> interfaces:
> >>
> >> Shell> ifconfig -l
> >>
> >> -----------------------------------------------------------------
> >>
> >> name         : eth0
> >> Media State  : Media present
> >> policy       : dhcp
> >> mac addr     : 68:05:CA:16:8C:5E
> >>
> >> ipv4 address : 0.0.0.0
> >>
> >> subnet mask  : 0.0.0.0
> >>
> >> default gateway: 0.0.0.0
> >>
> >>    Routes (0 entries):
> >>
> >> DNS server   :
> >>
> >> -----------------------------------------------------------------
> >>
> >> name         : eth1
> >> Media State  : Media present
> >> policy       : static
> >> mac addr     : 6E:70:FE:EC:00:06
> >>
> >> ipv4 address : 192.168.1.200
> >>
> >> subnet mask  : 255.255.255.0
> >>
> >> default gateway: 192.168.1.1
> >>
> >>    Routes (2 entries):
> >>      Entry[0]
> >>       Subnet : 192.168.1.0
> >>       Netmask: 255.255.255.0
> >>       Gateway: 0.0.0.0
> >>      Entry[1]
> >>       Subnet : 0.0.0.0
> >>       Netmask: 0.0.0.0
> >>       Gateway: 192.168.1.1
> >>
> >> DNS server   :
> >>
> >> -----------------------------------------------------------------
> >>
> >> B) Now, I try to assign a static IP address to the eth1 interface,
> >> which also works fine:
> >>
> >> Shell> ifconfig -s eth1 static 192.168.1.200 255.255.255.0
> >> Shell> 192.168.1.1
> >> InstallProtocolInterface: F4B427BB-BA21-4F16-BC4E-43E416AB619C
> >> 8370DFBAB0
> >>
> >> C) Now, when I try to ping a server over a LAN cable, I get the
> >> following error message:
> >>
> >> Shell> ping 192.168.1.1
> >> InstallProtocolInterface: 41D94CD2-35B6-455A-8258-D4E51334AADD
> >> 8370DFD9E0
> >> InstallProtocolInterface: 8A219718-4EF5-4761-91C8-C0F04BDA9E56
> >> 8370DFF8A0
> >>
> >> Snp->undi.transmit()  8000h:Ah
> >> Config No mapping
> >>
> >> D) When I disable the PCIe-E1000 driver explicitly in my .fdf file, I
> >> get only one 'eth0'
> >> interface and then I am able to assign an IP address statically and
> >> PING a server on LAN successfully.
> >>
> >> So, my query is whether two SNP drivers can be supported
> >> simultaneously over the Shell?
> >>
> >> I also went through the Shell Specifications
> >> (http://www.uefi.org/sites/default/files/resources/UEFI_Shell_2_2.pdf
> >> ), but I cannot find a command that can be used to "select" one of
> >> the Ethernet interface to be used for PING/TFTP like commands when
> >> both the Ethernet interfaces are enabled.
> >>
> >> Any pointers?
> >>
> >> Regards,
> >> Bhupesh
> >> _______________________________________________
> >> edk2-devel mailing list
> >> edk2-devel@lists.01.org
> >> https://lists.01.org/mailman/listinfo/edk2-devel
> > _______________________________________________
> > edk2-devel mailing list
> > edk2-devel@lists.01.org
> > https://lists.01.org/mailman/listinfo/edk2-devel
> >
> 
> 
> --
> Thanks,
> David Van Arnem

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to