Skip to main content

Networking Guide

This guide explains the different network types available in Karen Cloud Services and how to configure networking for various scenarios, including public and private network setups.

Network Types Overview 📡

Karen Cloud Services provide two primary network types to meet different connectivity requirements:

Public Network (Bridge Network)

The Public Network provides direct connectivity to the external internet, allowing virtual machines to obtain public IP addresses and communicate directly with external services.

Key Features:

  • Direct Internet Access: Virtual machines get public IP addresses
  • Automatic IP Assignment: When network interfaces are associated with public networks, we automatically assign public IP addresses
  • High Performance: Minimal network latency due to direct bridging
  • Public Services: Ideal for web servers, APIs, and services that need external access
  • Security Considerations: Requires careful security group configuration

Use Cases:

  • Web servers and applications
  • Public-facing APIs
  • Load balancers
  • VPN gateways

NAT Network (Private Network)

The NAT Network creates an isolated private network environment where virtual machines communicate through network address translation.

Key Features:

  • Network Isolation: Virtual machines are on a private subnet
  • Free C-Class Allocation: Each virtual network receives one free C-class subnet (256 IP addresses) for private use
  • Random IP Assignment: When network interfaces are associated with NAT networks, we randomly assign available IP addresses from the network's C-class subnet
  • Outbound Access: Internet access through NAT gateway
  • Security: Enhanced isolation from external threats
  • Internal Communication: Seamless communication between VMs on the same network

Use Cases:

  • Internal application servers
  • Database servers
  • Development and testing environments
  • Multi-tier application architectures

Networking Scenarios 🏗️

Scenario 1: Hybrid Networking (Public + Private)

In this configuration, a single virtual machine has two network interfaces:

  • One connected to the Public Network for external access
  • One connected to a NAT Network for internal communication

Configuration Steps:

  1. Create Networks:

    • Create a Public Network (Bridge type)
    • Create a NAT Network (NAT type)
  2. Configure Virtual Machine:

    • Add primary interface to Public Network
    • Add secondary interface to NAT Network
    • Configure appropriate security groups for each interface
  3. Security Group Setup:

    • Public Interface: Allow necessary inbound ports (e.g., 80, 443 for web services)
    • Private Interface: Restrict to internal communication only

Benefits:

  • Load Balancing: Handle external traffic while maintaining internal services
  • Security: Isolate sensitive services on private network
  • Flexibility: Support complex application architectures

Scenario 2: Private Network Cluster

Multiple virtual machines connected only to NAT Networks, creating isolated internal environments.

Configuration Steps:

  1. Create NAT Network:

    • Set up a dedicated NAT Network for the cluster
  2. Deploy Virtual Machines:

    • All VMs connect only to the NAT Network
    • No public interfaces for enhanced security
  3. Internal Services:

    • Configure internal load balancers
    • Set up service discovery
    • Implement internal DNS resolution

Benefits:

  • Enhanced Security: No direct external exposure
  • Cost Effective: No public IP costs for internal services
  • Simplified Management: Unified network management

Network Configuration Best Practices 💡

Public Network Best Practices

  • Minimal Exposure: Only open necessary ports
  • Use Security Groups: Implement defense in depth
  • Monitor Traffic: Regularly review access logs
  • IP Management: Plan public IP allocation carefully

NAT Network Best Practices

  • Network Segmentation: Use multiple NAT networks for different environments
  • Internal DNS: Implement DNS resolution for internal services
  • Bandwidth Planning: Monitor and allocate sufficient bandwidth
  • Access Control: Use security groups for internal traffic control

Hybrid Setup Considerations

  • Interface Priority: Configure routing priorities correctly
  • Firewall Rules: Ensure proper traffic flow between interfaces
  • Monitoring: Monitor both public and private traffic
  • Backup Planning: Consider network redundancy

Troubleshooting Network Issues 🔧

Public Network Issues

  • No Internet Access: Check security group outbound rules
  • Connection Timeouts: Verify network interface configuration
  • IP Conflicts: Ensure unique IP assignments

NAT Network Issues

  • Internal Connectivity: Check network membership and security groups
  • DNS Resolution: Verify DNS configuration
  • Performance Issues: Monitor network utilization

Hybrid Configuration Issues

  • Routing Problems: Check interface priorities and routing tables
  • Security Conflicts: Review overlapping security group rules
  • Traffic Isolation: Ensure proper segmentation between networks

Advanced Networking Features 🚀

Network Security

  • Security Groups: Granular traffic control
  • Network ACLs: Additional layer of network security
  • VPN Integration: Secure remote access options

Performance Optimization

  • Bandwidth Allocation: Adjust based on workload requirements
  • Traffic Shaping: Control network traffic patterns
  • Load Balancing: Distribute traffic across multiple interfaces

Monitoring and Analytics

  • Network Metrics: Monitor traffic patterns and performance
  • Security Events: Track security-related network events
  • Usage Analytics: Analyze network utilization trends

Getting Help 🆘

If you encounter complex networking issues:

  1. Review Documentation: Check this guide and related network documentation
  2. Check Monitoring: Use the monitoring dashboard for network insights
  3. Submit Support Ticket: Provide detailed network configuration and error logs
  4. Community Forums: Engage with other users for configuration tips