Questions tagged [ifconfig]

ifconfig (short for interface configuration) is a system administration utility in Unix-like operating systems to configure, control, and query TCP/IP network interface parameters from a command line interface (CLI) or in system configuration scripts.

ifconfig (short for interface configuration) is a system administration utility in Unix-like operating systems to configure, control, and query TCP/IP network interface parameters from a command line interface (CLI) or in system configuration scripts. Ifconfig originally appeared in 4.2BSD as part of the BSD TCP/IP suite.

You can use the ifconfig command to assign an address to a network interface and to configure or display the current network interface configuration information.

Read more about ifconfig at Wikipedia..

224 questions
2
votes
7 answers

How do I get the IP of only one Interface

When I tried ifconfig it gives me the whole all the information regarding the Network Adapter. I tried : system( "ifconfig -a | grep inet | " "sed 's/\\([ ]*[^ ]*\\)\\([ ]*[^ ]*\\).*$/\\1 \\2/' " " > address.txt" ) ; which…
Simsons
  • 12,295
  • 42
  • 153
  • 269
2
votes
1 answer

is there universal/default IP for accessing routers web interface

I have a requirement where i need to access routers web interface and extract few information. I'm assuming that 192.168.1.1 will be default router IP address for every different types of router ( even different manufacturers ) to access the web…
Manisha
  • 372
  • 3
  • 13
2
votes
1 answer

Interface goes missing from ifconfig in DPDK

I am running Oracle VirtualBox and i have created two interfaces. I run DPDK and i add one interface to DPDK and i see that it goes missing from my ifconfig. Screen shots below: root@VirtualBox:/home/akabra/dpdk/dpdk-2.0.0/tools# ifconfig eth1 …
Abhishek
  • 275
  • 7
  • 18
2
votes
1 answer

how to use SIOCIFDESTROY in FreeBSD?

My app creates a tap interface, and everything works well. But on FreeBSD, when it exits, the tap interface remains. To delete it, I have to manually run this command: sudo ifconfig tap0 destroy But I'd like to do this programmatically within my…
Stéphane
  • 19,459
  • 24
  • 95
  • 136
2
votes
1 answer

Hadoop Cluster datanode network error

I have a small cluster with Cloudera Hadoop installation. After a few days, I noticed that there is constantly errors/dropped/frame when I run ifconfig -a command. (From the highlevel perspective, map reduce job will run smoonthly without error and…
B.Mr.W.
  • 18,910
  • 35
  • 114
  • 178
2
votes
2 answers

Can I detect network and netmask of the configured connected device with static IP

I am running Linux device with wired network interface. Another end of this interface is plugged into another network-aware device that is configured to use some static IP address and some netmask. Hence we have a very simple network consisting of…
Audrius Meškauskas
  • 20,936
  • 12
  • 75
  • 93
2
votes
2 answers

Extracting netmask from ifconfig output and printing it in CIDR format

I need to extract the netmask for two sets of IPs and print it in CIDR format, out on to the screen. Thinking of using either shell or tcl to do this. Guess the major sticky points here is converting the hexadecimal netmask into CIDR format. Tried…
egorulz
  • 1,455
  • 2
  • 17
  • 28
2
votes
1 answer

Parse numeric ifconfig flags

The ifconfig command outputs its flags in both textual and numeric format. While I can find a reference here or there to the numeric flags, I cannot find any indication on how to interpret (mask) the number. qfe2:…
David Citron
  • 43,219
  • 21
  • 62
  • 72
2
votes
1 answer

Retrieveing eth0 ipv6 address on linux

I'm looking to use my eth0 ipv6 address in one of my shell scripts. I could retrieve it using ifconfig and grep, but I'm certain that it must be somewhere in some text file I'm not seeing, which would ultimately make it much easier to retrieve.…
user1553248
  • 1,184
  • 2
  • 19
  • 33
2
votes
1 answer

Use ifconfig to turn on network in Android but it doesn't work

I have tried to use adb shell to operate the network interface of my phone(HTC Desire Z). You can see in the image ,I ping a site first,then turn 3G network down ,and ping it again ,it said Network is unreachable . But when I turn it on ,and use …
user1501153
  • 31
  • 1
  • 3
2
votes
2 answers

How to use pipe to parse output of a command

I want to process the output of a process, say ifconfig. As you all know output of ifconfig is a list of lines containing inet addr: mask: etc. But I want to extract the ip alone[from inet addr: field] and list it. is it possible with pipe command?…
ScarCode
  • 3,074
  • 3
  • 19
  • 32
1
vote
1 answer

PHP select text from a complex string

I am getting output from my linux box running the ifconfig command. I do so by running the shell_exec command. I found an example but I can't seem to work further with it. This is my current code. public function get_network_interfaces() { //…
Roel
  • 1,462
  • 4
  • 19
  • 31
1
vote
1 answer

Java: HttpServletRequest.getRemoteAddr() not shows IP same as CURL or IFConfig

My QA Server IFConfig is showing following IP: docker0: flags=4099 mtu 1500 inet 172.16.0.1 netmask 255.255.0.0 broadcast 0.0.0.0 ether 02:42:73:6e:ba:54 txqueuelen 0 (Ethernet) RX packets 0 …
fatherazrael
  • 5,511
  • 16
  • 71
  • 155
1
vote
1 answer

Python-Paramiko: Connected to server with SSH, not getting output from 'ls' command

I made a client server program using Paramiko. I manage to get a connection, and send command. For example if I send a 'ifconfig' command, it indeed returns the desired output. Yet, when I try to send an 'ls' command, it returns nothing. I need the…
salomon
  • 11
  • 2
1
vote
2 answers

No public IP when running ifconfig on publicly accessible Azure instance created via Terraform

I am provisioning a cluster on Azure where I can SSH into each machine using their public IPs. The Terraform file: provider "azurerm" { version = "~>2.0" features {} } resource "azurerm_resource_group" "main" { name =…
Armand Grillet
  • 3,229
  • 5
  • 30
  • 60