Results 1 to 3 of 3

Thread: Configuring networking in Red Hat 7.3

  1. #1
    Join Date
    Jun 2002
    Posts
    648
    Rep Power
    0

    Default Configuring networking in Red Hat 7.3

    Where do I go to configure my network in RH?

    I want to specify my IP address as well as gateway, etc.

    Thanks in advance

  2. #2
    Join Date
    Jul 2002
    Posts
    228
    Rep Power
    0

    Default Re:Configuring networking in Red Hat 7.3

    There is the easy way ,the not so easy way, and the hard way :
    1: The easy way....as the root user type 'setup' then go to network configuration ,uncheck dhcp and fill in the blanks
    .
    2: The not so easy way cd to /etc/sysconfig/ [as root] vi network and if blank add the lines...
    NETWORKING=yes
    HOSTNAME=robyg.donman.com
    GATEWAY=192.168.0.1 [change this]
    GATEWAYDEV=eth0 [if you have more than one eth dev configured]

    then cd to network-scripts and vi the eth dev you want to use (eg eth0..ifcfg-eth0) and add this:
    DEVICE=eth0
    BOOTPROTO=static
    IPADDR=robyg.donman.com
    BROADCAST=192.168.1.255
    NETMASK=255.255.255.255
    NETWORK=192.168.0.0
    ONBOOT=yes

    Then in your /etc host file add :
    192.168.0.10 robyg.donman.com robyg
    Then run /etc/init.d/network start .
    This way to change your IP after you only vi /etc/hosts and change the ip for robyg.donman.com.
    Redhat 7.3 may have also added the directive IPNAME however using a FQDN in ifcfg-eth0 for the IPADDR with a corresponding entry in /etc hosts is enough.

    3:The hard way....with no interfaces configured type the following :
    ifconfig [interface_name] inet [ipaddress] netmask [255.255.x.x] broadcast [x.x.x.255]

    this was all in on line (just incase a wordwrap happened here) check that all looks good with `ifconfig -a`
    now this is not all set up the gateway(default route) as such :
    route add -net [192.168.1.0] netmask [255.255.255.255] gw 192.168.1.254 dev ethx
    now type route -n
    if all looks good ping www.cnn.com now (a) make a startup script and add all the ifconfig and route settings there or (b) use redhats network startup script create a /etc/sysconfig/static-routes file with the route configs or (c) just fill out the ifcfg-ethx file and network file with all this info just as in (2) just that (3) with no interfaces configured allows for immediate use of the device without running /etc/init.d/network start :P

  3. #3
    Join Date
    Jun 2002
    Posts
    648
    Rep Power
    0

    Default Re:Configuring networking in Red Hat 7.3

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •