Sponsored Content
Full Discussion: Alias ip & hostname
Operating Systems Linux Red Hat Alias ip & hostname Post 302974626 by raokl on Wednesday 1st of June 2016 04:02:11 PM
Old 06-01-2016
Alias ip & hostname

Hello Forum members,

I am new to the Linux administration and i have a question on the below requirement , requirement is as below

Create a new alias-IP & alias-Host name to the existing virtual machine ( RHEL 6.6)

I have created alias-IP and here is the below

Code:
 
eth3      Link encap:Ethernet  HWaddr 00:12:34:A0:56:00
          inet addr:10.1.2.3  Bcast:10.1.2.3  Mask:255.255.255.0
          inet6 addr: ab10::123:45aa:abc1:1200/12 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:123456789 errors:0 dropped:0 overruns:0 frame:0
          TX packets:123456789 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:123456789012 (123.4 GiB)  TX bytes:123456789012 (456.1 GiB)

eth3:1    Link encap:Ethernet  HWaddr 00:12:34:A0:56:00
          inet addr:10.1.2.4  Bcast:10.1.2.3  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:31711983 errors:0 dropped:0 overruns:0 frame:0
          TX packets:31711983 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
       RX bytes:123456789012 (12.4 GiB)  TX bytes:123456789012 (24.1 GiB)

But the users have a request ( they use this values in the script to start the servers and bind them to the IP & PORT ) where in when they SSH with the alias-IP and do

Code:
 hostname -i

it should give 10.1.2.4 but is is giving 10.1.2.3

for alias-Host name i have added the DNS entries but users have the similar requirement there as well

Code:
 hostname -s

It should give them actual host-name or alias-Hostname based on how they login , Can you please help me with this

Last edited by Scrutinizer; 06-02-2016 at 01:15 AM.. Reason: doubt -> question
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Alias's & Functions - simple question

Having a memory lapse: If I redefine a command using an alias or a function - How do I access the "real" command without specifying an absoulte path: i.e. function man { /usr/bin/man |more } alias ls='/usr/bin/ls -l' How do I specify the ls or man command above without the... (6 Replies)
Discussion started by: kornshellmaven
6 Replies

2. HP-UX

alias & parameters

We just recently moved from a DG-UX (Unix V) to HP 9000 servers running POSIX. I used the c-shell in the DG-UX system mainly because the bourne-shell did not support aliasing. Now in the default posix-shell of HP aliasing is supported. The main difference seams to be that in a c-shell you can pass... (1 Reply)
Discussion started by: vslewis
1 Replies

3. Solaris

hostname alias

In solaris 9, how do I setup hostname alias, so essentially the machine has two hostnames... (3 Replies)
Discussion started by: csaunders
3 Replies

4. UNIX for Dummies Questions & Answers

alias for running in background &

Hi all, I am kinda new to this unix environment, and now I get confused to figure out this alias problem. I would like to make my xemacs to run in background every call, and I am trying to do it this way in .bashrc alias e='xemacs &* & ' i also tried e () { xemacs "&*" &} but they are... (0 Replies)
Discussion started by: hfireflyu
0 Replies

5. UNIX for Dummies Questions & Answers

Solaris - unknown hostname - how can I change hostname?

Hello, I am new to Solaris. I am using stand alone Solaris 10.0 for test/study purpose and connecting to internet via an ADSL modem which has DHCP server. My Solaris is working on VMWare within winXP. My WinXP and Solaris connects to internet by the same ADSL modem via its DHCP at the same... (1 Reply)
Discussion started by: XNOR
1 Replies

6. HP-UX

Hostname alias

How to set up hostname alias for HP-UX... (2 Replies)
Discussion started by: RPG
2 Replies

7. UNIX for Dummies Questions & Answers

Changing IP & hostname

I have to do this twice. First, A) change IP address, subnet & default gateway. then a few days later B) change IP address again (same subnet & gateway) & hostname. (why twice? To get the vlan stuff out of the way in advance) what is the best way to do A? can all be done through... (5 Replies)
Discussion started by: LisaS
5 Replies

8. Emergency UNIX and Linux Support

HP UX - ILO Console hostname different than Machine Hostname...

Hi All, So we added a new HP-UX 11.31 machine. Copied OS via Ignite-UX (DVD)over from this machine called machine_a. It was supposed to be named machine_c. And it is when you log in...however when I'm in the ILO console before logging in, it says: It should say: What gives? And how do... (4 Replies)
Discussion started by: zixzix01
4 Replies

9. Shell Programming and Scripting

Clear command help & alias

Hi Folks, When I type clear on my unix prompt on mac terminal, it prints the help menu of a program instead of cleaning the contents of the screen. Also, I have used the following alias command to setup some shortcuts, but soon after I logout and login, these shortcuts doesn't work. alias... (4 Replies)
Discussion started by: jacobs.smith
4 Replies

10. UNIX for Advanced & Expert Users

Hostname -f hostname: Unknown host

deleted (0 Replies)
Discussion started by: hce
0 Replies
PBFIFO(8)							       Linux								 PBFIFO(8)

NAME
pfifo - Packet limited First In, First Out queue bfifo - Byte limited First In, First Out queue SYNOPSIS
tc qdisc ... add pfifo [ limit packets ] tc qdisc ... add bfifo [ limit bytes ] DESCRIPTION
The pfifo and bfifo qdiscs are unadorned First In, First Out queues. They are the simplest queues possible and therefore have no overhead. pfifo constrains the queue size as measured in packets. bfifo does so as measured in bytes. Like all non-default qdiscs, they maintain statistics. This might be a reason to prefer pfifo or bfifo over the default. ALGORITHM
A list of packets is maintained, when a packet is enqueued it gets inserted at the tail of a list. When a packet needs to be sent out to the network, it is taken from the head of the list. If the list is too long, no further packets are allowed on. This is called 'tail drop'. PARAMETERS
limit Maximum queue size. Specified in bytes for bfifo, in packets for pfifo. For pfifo, defaults to the interface txqueuelen, as speci- fied with ifconfig(8) or ip(8). For bfifo, it defaults to the txqueuelen multiplied by the interface MTU. OUTPUT
The output of tc -s qdisc ls contains the limit, either in packets or in bytes, and the number of bytes and packets actually sent. An unsent and dropped packet only appears between braces and is not counted as 'Sent'. In this example, the queue length is 100 packets, 45894 bytes were sent over 681 packets. No packets were dropped, and as the pfifo queue does not slow down packets, there were also no overlimits: # tc -s qdisc ls dev eth0 qdisc pfifo 8001: dev eth0 limit 100p Sent 45894 bytes 681 pkts (dropped 0, overlimits 0) If a backlog occurs, this is displayed as well. SEE ALSO
tc(8) AUTHORS
Alexey N. Kuznetsov, <kuznet@ms2.inr.ac.ru> This manpage maintained by bert hubert <ahu@ds9a.nl> iproute2 10 January 2002 PBFIFO(8)
All times are GMT -4. The time now is 11:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy