Question

i have been trying to install edX ,one of its command line instruction is

 cat /etc/hosts

i am getting the response as

 cat /etc/hosts
 127.0.0.1  localhost
 127.0.1.1  precise64

 # The following lines are desirable for IPv6 capable hosts
 ::1     ip6-localhost ip6-loopback
 fe00::0 ip6-localnet
 ff00::0 ip6-mcastprefix
 ff02::1 ip6-allnodes
 ff02::2 ip6-allrouters

broadcast ip is missing ,why is it so?

Was it helpful?

Solution

You don't typically list a broadcast address in /etc/hosts file. Why would you expect to see it there?

What is 'edX' anyway? Got a url for its README file?

Come to think of it, if you really need the broadcast mask for your host, you're better off using a variant of ifconfig. Here are some examples:

(Solaris 11.x)

enter code here
$ ipadm show-addrprop -p broadcast e1000g0/v4
ADDROBJ           PROPERTY   PERM CURRENT         PERSISTENT      DEFAULT         POSSIBLE
e1000g0/v4        broadcast  r-   192.168.1.255   --              192.168.1.255   --
limoncello:jmcp $ ifconfig e1000g0
e1000g0:  flags=100001100943<UP,BROADCAST,RUNNING,PROMISC,MULTICAST,ROUTER,IPv4,PHYSRUNNING>     mtu 1500 index 2
inet 192.168.1.20 netmask ffffff00 broadcast 192.168.1.255

Alternatively, on linux (Debian Jessie):

 jmcp@debiant:~$ /sbin/ifconfig eth0
 eth0      Link encap:Ethernet  HWaddr 08:00:27:cd:61:7c  
      inet addr:192.168.1.249  Bcast:192.168.1.255  Mask:255.255.255.0
      inet6 addr: fe80::a00:27ff:fecd:617c/64 Scope:Link
      inet6 addr: 2001:44b8:2188:f000:a00:27ff:fecd:617c/64 Scope:Global
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:258 errors:0 dropped:0 overruns:0 frame:0
      TX packets:208 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:44119 (43.0 KiB)  TX bytes:29635 (28.9 KiB)

On the Solaris host, the broadcast addr for the interface I'm interested in is 192.168.1.255; on the Debian vm, it's the same.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top