Sponsored Content
Top Forums Shell Programming and Scripting dhcpclient for all the eth* which has no ip Post 302700179 by Ygor on Thursday 13th of September 2012 05:23:54 AM
Old 09-13-2012
Try using something like...
Code:
$ cat file1
eth0      Link encap:Ethernet  HWaddr 00:1E:67:3E:BA:EF
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Memory:d1900000-d1920000

eth1      Link encap:Ethernet  HWaddr 00:1B:21:3F:BF:28
          inet addr:192.85.1.1  Bcast:192.85.255.255  Mask:255.255.0.0
          inet6 addr: fe80::21b:21ff:fe3f:bf28/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:35 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:5126 (5.0 KiB)

eth2      Link encap:Ethernet  HWaddr 00:1E:67:3E:BA:EE
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Memory:d1920000-d1940000

$ awk '/^eth/{e[++c]=$1}/inet addr/{a[c]=$2}END{for(i=1;i<=c;i++)if(!a[i])print e[i]}' file1
eth0
eth2

$

 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Eth err: "3c501 device eth0 does not seem to be present"

HI, When I do 'service network restart' , I am getting the following error. "3c501 device eth0 does not seem to be present, delaying initialization" Can any one suggest me the cause/solution for this? When I do 'lspci' it is showing the ehternet card as " Ethernet controller"Marvell... (2 Replies)
Discussion started by: praveen_b744
2 Replies

2. Linux

Renaming eth interfaces

Hi I had a DL380 with two two port eth cards. I now replaced one with a four port eth card and my interfaces seemed to have jumped around. Is there a method of moving eth ports... eg making port eth4 eth2.:confused: (2 Replies)
Discussion started by: theroncj
2 Replies

3. UNIX for Dummies Questions & Answers

NIC and eth connection

folks; This might sounds stupid but i hope someone can give me an answer: On my Linux SUSE boxes, i have 2 NIC cards NIC1 & NIC2. I always assumed that NIC1 is eth0 when i run "ifconfig" and NIC2 is eth1 but i noticed that's not always the case. Is there a way or a command i can run to find... (1 Reply)
Discussion started by: Katkota
1 Replies

4. IP Networking

Socket and interface (eth0, eth 1)relationship

hi, Could some one answer this please we have a program with client socket declared which connect to a server for the above program description we wont send an interface information ... let us suppose, I have two interfaces (eth0 , eth1) which are assigned some ip, which interface the... (1 Reply)
Discussion started by: Gopi Krishna P
1 Replies

5. IP Networking

Eth interfaces UP but NOT RUNNING

Hi people, I have a solaris OS system. I configured its interfaces. They are UP but not in RUNNING status except loopback interface. I made the interfaces DOWN and UP again. The other side of the interfaces (switch ports) are UP. Does anyone have any idea? What may cause this problem, How can I... (1 Reply)
Discussion started by: hubatuwang
1 Replies

6. Red Hat

Find out which eth or device belongs to interface "port 1 PCI 4"

Hi, I´ve given only this info to configure a network interface : "port 1 PCI 4" I´ve been searching for any kind of relationship in the system which allow me to find the etc that must be configured... Please, could anybody help me? rhxx:#/root# lspci |grep -i "PCI BRIDGE" 00:01.0 PCI... (0 Replies)
Discussion started by: pabloli150
0 Replies

7. UNIX for Dummies Questions & Answers

Traffic moves to another eth

hi guys I have a server which has 2 nics eth0 and eth1 eth0 is used for our email traffic server. everything working fine some time later a eth1 was added for backup purposes so this new nic sends data to another vlan for backup purposes all of a sudden our mail server starts to fail... (3 Replies)
Discussion started by: karlochacon
3 Replies

8. Red Hat

ifconfig eth - errors after certain packets received

Hi, I am facing an issue with one of the 10G fiber link. After certain packets received. I am seeing errors in ifconfig eth* output. MTU is set to 9000. any idea? (1 Reply)
Discussion started by: snchaudhari2
1 Replies

9. UNIX for Advanced & Expert Users

RedHat eth interfaces not seem to be present

Dear community, I'm in trouble with Red Hat Server 5.8. After rebooting the server, I loose two interfaces used for bond2 (eth4 and eth5). I reboot twice the server but the result is always: # service network restart Shutting down interface bond0: Shutting down... (1 Reply)
Discussion started by: Lord Spectre
1 Replies
PCNET_CS(4)						     Kernel Interfaces Manual						       PCNET_CS(4)

NAME
pcnet_cs - generic NS8390-based PCMCIA Ethernet Driver SYNOPSIS
insmod pcnet_cs.o [pc_debug=n] [irq_list=i,j,...] [if_port=n] [full_duplex=n] [use_big_buf=n] [use_shmem=n] [mem_speed=n] [delay_output=n] [delay_time=n] [hw_addr=n,n,n,n,n,n] DESCRIPTION
Pcnet_cs is a driver for all NS8390-based PCMCIA ethernet cards. It can use either polled IO or a shared memory window to exchange data with the card. The driver first tests for a shared memory buffer, falling back on polled IO if the memory test fails. When this driver is bound to a card, it allocates the next available ethernet device (eth0..eth#). This device name will be reported in the kernel log file, and passed on to cardmgr(8). PARAMETERS
pc_debug=n Selects the PCMCIA debugging level. This parameter is only available if the module is compiled with debugging enabled. A non-zero value enables debugging. irq_list=i,j,... Specifies the set of interrupts that may be allocated by this driver. if_port=n Selects the transceiver type, for Socket EA and IBM CCAE cards. 1 is 10baseT (twisted pair), and 2 is 10base2 (BNC, or thin net). The default is 1 (10baseT). full_duplex=n For DL10022 based cards where pcnet_cs can't find the MII interface, this option permits manual control of the duplex setting. 1 is full duplex, and 0 is half duplex; the default is 0. use_big_buf=n For Socket EA cards, a flag indicating if the driver should use the large (64K) packet buffer. The default is 1 (true). use_shmem=n Selects shared memory versus polled IO mode for packet transfers. The default is -1, meaning to use the card's CIS information to decide. mem_speed=n Sets the access speed of the shared memory window, in nanoseconds. The default is 0 (i.e., no extra wait states). Values of up to 1000 are legal. delay_output=n Specifies that a delay should be inserted after a polled IO block output. This is turned on by default for Accton and Socket EA cards. delay_time=n Specifies the length of the delay_output delay, in microseconds. The default is 4. hw_addr=n,n,n,n,n,n For cards whose hardware ethernet addresses can't be identified by the current driver, this is a hack for hardwiring a specific address. The argument should consist of exactly six byte-sized numbers, separated by commas, with no spaces. Numbers may be in decimal or hex ('0xNN'). DIAGNOSTICS
pcnet_cs: this is an AX88190 card! Indicates that this card is based on the Asix AX88190 chipset, which requires the axnet_cs driver. eth#: interrupt(s) dropped! Indicates that the driver did not receive an interrupt notification for some reason. The driver will poll the card (with a signifi- cant performance penalty) if the problem persists. The most likely cause is an interrupt conflict and/or host bridge configuration problem. eth#: MII is missing! Indicates that the driver expects this card to have a ``Media Independent Interface'' for link speed and duplex selection, but could not find it. AUTHOR
David Hinds - dahinds@users.sourceforge.net SEE ALSO
cardmgr(8), pcmcia(5). pcmcia-cs 2001/11/04 22:57:46 PCNET_CS(4)
All times are GMT -4. The time now is 12:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy