<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ip &#8211; Luxing Huang</title>
	<atom:link href="https://luxing.im/tag/ip/feed/" rel="self" type="application/rss+xml" />
	<link>https://luxing.im</link>
	<description>Thoughs and things</description>
	<lastBuildDate>Mon, 20 Jul 2020 03:38:47 +0000</lastBuildDate>
	<language>en-CA</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>
<site xmlns="com-wordpress:feed-additions:1">58771605</site>	<item>
		<title>Make virtual ethernet the default</title>
		<link>https://luxing.im/make-virtual-ethernet-the-default/</link>
					<comments>https://luxing.im/make-virtual-ethernet-the-default/#respond</comments>
		
		<dc:creator><![CDATA[Luxing Huang]]></dc:creator>
		<pubDate>Mon, 20 Jul 2020 03:34:52 +0000</pubDate>
				<category><![CDATA[Learning Notes]]></category>
		<category><![CDATA[Techie Stuff]]></category>
		<category><![CDATA[ip]]></category>
		<category><![CDATA[route]]></category>
		<category><![CDATA[vm]]></category>
		<guid isPermaLink="false">https://luxing.im/?p=845</guid>

					<description><![CDATA[Recently I leased a server with 2 IPs, x.x.x.x and y.y.y.y from a VPS company. Their first IP is the primary one and is connected to my VM, the secondary IP y.y.y.y is there for me to use, but have not connected yet. Given the following status quo: The primary x.x.x.x is a great IP &#8230; <p class="link-more"><a href="https://luxing.im/make-virtual-ethernet-the-default/" class="more-link">Continue reading<span class="screen-reader-text"> "Make virtual ethernet the default"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>Recently I leased a server with 2 IPs, x.x.x.x and y.y.y.y from a VPS company. Their first IP is the primary one and is connected to my VM, the secondary IP y.y.y.y is there for me to use, but have not connected yet.</p>
<p><span id="more-845"></span><br />
Given the following status quo:</p>
<p>The primary x.x.x.x is a great IP and has good connectivity all over the world, however their y.y.y.y secondary IP has a premium networking route to certain places in the world in addition. I&#8217;d like to have both IP working in the mean time make y.y.y.y the default IP. My operating system is CentOS 7.</p>
<p>I would like to achieve the goal of:<br />
1. Add y.y.y.y to the system<br />
2. Make y.y.y.y the default IP, if seen from outside world.<br />
3. Keep the primary x.x.x.x IP available and connected just in case for failover.</p>
<p>So here is how I did it:</p>
<ol>
<li>Copy from ifcfg-eth0 to ifcfg-eth0:1 and change ifcfg-eth0:1 file in /etc/sysconfig/network-scripts</li>
<pre>
BOOTPROTO=none
DEFROUTE=yes
DEVICE=eth0:1
GATEWAY=y.y.y.1
HWADDR=be:ef:be:ef:be:ef
IPADDR=y.y.y.y
IPV6INIT=no
NETMASK=255.255.255.0
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
</pre>
<p>Here BOOTPROTO must be none, make sure you keep the MAC address the same as ifcfg-eth0 and replace the values I obfuscated.</p>
<li>Modify ifcfg-eth0 file with DEFROUTE=no</li>
<li>Add a static route to make sure. Create a file route-eth0 in /etc/sysconfig/network-scripts</li>
<pre>
default via y.y.y.1 dev eth0:1
</pre>
<li>Restart network service</li>
<pre>systemctl restart network</pre>
<li>Confirm your IP and route</li>
<pre>
# confirm IP:
ip a

# confirm route:
ip ro
</pre>
</ol>
<p>And your VM&#8217;s default IP to the outside world should be y.y.y.y now.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://luxing.im/make-virtual-ethernet-the-default/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">845</post-id>	</item>
		<item>
		<title>Check Out your IP address (And User-Agent)</title>
		<link>https://luxing.im/check-out-your-ip-address/</link>
					<comments>https://luxing.im/check-out-your-ip-address/#respond</comments>
		
		<dc:creator><![CDATA[Luxing Huang]]></dc:creator>
		<pubDate>Mon, 11 May 2015 12:16:44 +0000</pubDate>
				<category><![CDATA[Techie Stuff]]></category>
		<category><![CDATA[ip]]></category>
		<category><![CDATA[ipv4]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[ssl]]></category>
		<guid isPermaLink="false">https://luxing.im/?p=501</guid>

					<description><![CDATA[I know there are many tell-your-IP-address services available, some even have the whois lookup functionality. I found it was unhelpful when it comes to scripting. I made a website, it has more features which curlmyip.com doesn&#8217;t have. It could report your IP address for a script-friendly way (direct response). It supports ipv4, ipv6 and SSL &#8230; <p class="link-more"><a href="https://luxing.im/check-out-your-ip-address/" class="more-link">Continue reading<span class="screen-reader-text"> "Check Out your IP address (And User-Agent)"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>I know there are many tell-your-IP-address services available, some even have the whois lookup functionality. I found it was unhelpful when it comes to scripting. I made a website, it has more features which curlmyip.com doesn&#8217;t have. It could report your IP address for a script-friendly way (direct response). It supports ipv4, ipv6 and SSL access.<br />
<span id="more-501"></span><br />
IP:<br />
<a href="http://ipv4.luxing.im" target="_blank">http://ipv4.luxing.im</a><br />
<a href="http://ipv6.luxing.im" target="_blank">http://ipv6.luxing.im</a><br />
<a href="http://ip.luxing.im" target="_blank">http://ip.luxing.im</a><br />
<a href="https://get.luxing.im/ip" target="_blank">https://get.luxing.im/ip</a></p>
<p>User-Agent:<br />
<a href="http://ua.luxing.im" target="_blank">http://ua.luxing.im</a><br />
<a href="https://ua.luxing.im" target="_blank">https://ua.luxing.im</a><br />
<a href="http://get.luxing.im/ua" target="_blank">http://get.luxing.im/ua</a></p>
<p>When you are using the ua.luxing.im method in cURL, you need to add -L option to follow the link.</p>
<p>If you are using cURL with SSL, you may need to take a look at <a href="https://luxing.im/curl-support-for-cloudflare-enabled-websites/">this</a> article.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://luxing.im/check-out-your-ip-address/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">501</post-id>	</item>
	</channel>
</rss>
